The gesture recognization engine, in ultra-beta commandline form.

Use it like this:

./engine.exe <dictionary_file> <data_file> [-v]

For example, calling:

./engine.exe dict data2

spits out:

^RDRD$
^RRRRRRRRRRDDDDDDDDRRRRRRRRRRDDDDDDD$

Ignore the ^ and $.  Otherwise the first line is the string deemed
"most probable" by the model. The second line is a labelling for each
data point.  -v spits out a bunch of extra crap, primarily the data
structures that are constructed to do the inference.

If you want to test this yourself, modify the dictionary and data
file.  The first line of the dictionary contains the number of words,
each subsequent line contains a word followed by its probability.  The
first line of the data file contains the number of data points, each
subsequent line contains a single decimal number.  Each number is
intended to be the angle (in radians) of the mouse displacement at
that time step.  They are measured counterclockwise from due right
(i.e. the result of atan2(dy,dx)).

There are a couple of hardcoded variables in engine.h that one might
want to play with. 

TRANSITION_PROB .1,
the prior probability on switching characters between subsequent timesteps

INIT_TRANSITION_PROB 0.5,
the prior probability on switching from a terminal character (^ or $) to
a non-terminal character after one timestep

There are also some hardcoded parameters in engine_observation.cpp, but
they are harder to describe (but easier to understand). 

Aaron Lenfestey
lenfestey at gmail.com 
