Proof-pof-concept code tthat impelements Angel's algorightm from the "Arithmetic hide and seek" problem
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

The Game of Arithmetic Hide and Seek

Implementation of Angel's algorithm (solution of the problem). See more here:

The program enumerates all expressions, buit of operations +-/*^ integer numbers and variable k, substituting current move number to k.

Resulting sequence is guaranteed to intersect with any sequence, generted by a fixed formula.


Python 3, pyparsing.

To validate and evaluare expressions, pyparsing is used. The code is in Python 3, bus should work in Python 2 with minor modifications (prints etc).


Simply enumerate all strings of characters "0123456789+-*/^()k", and choose those that are valid expressions.