Instead of storing a rational for evey game state,
we just store how many of the factorial(draw pile size) many
game states can be won.
This allows us to save only one 64-bit integer per game state instead of
two and thus reduces memory consumption of the program significantly.
Also, this makes some computations a bit easier, since we do not have to
normalize when recursing - we can just add the numbe of winnable states
for each possible draw.
On the other hand, this means that upon lookup, we have to normalize the
stored values again to retrieve the probabilities.
In particular, one needs to know what the draw pile size of the game
state is in order to interpret the value of the state.
This now allows to import a light-weight header containing
the abstract interface separately from the templated header
that manages the actual backtracking, thus speeding up compilation.
This ensures that when doing a regular revert,
we revert to exactly the same state (i.e. also identical
ordering of draw pile by default)
and only rotate the draw pile in case we ensure internally
that we iterate over all possible draws so that the ordering
is restored in the end.
A third CLI argument is now accepted, describing a score goal.
The program will then treat reaching this score as a win and
calculate lines optimized for this score, ignoring any (possible)
higher scores.
Outputting of probabilities is now done in unified way.
This ensures that we can handle both rational and floating-point
probabilities in all program parts properly.
The compile-time macro
NUSE_RATIONAL_PROBABILITIES
can now be defined to use floating-point probabilities instead
of real rational ones.
Using floating-point results in roughly 10% speedup.