it is needed to eliminate duplicate solutions to the 24 puzzle.
found that certain 19 rules can normalize an expr.
however, it didn't work for exprs whose value is 0 (or the 0 puzzle).
(due to an infinite loop.)
it is needed to eliminate duplicate solutions to the 24 puzzle.
found that certain 19 rules can normalize an expr.
however, it didn't work for exprs whose value is 0 (or the 0 puzzle).
(due to an infinite loop.)
converts an expr by certain rules like
A * 1 * 1 ⟹ A + 1 - 1.
i called the result the yuuki normal form (YNF).
defines exprs the same iff they have the same YNF.
i implemented this using Perl extended regexes.
https://github.com/yuuki15/24/blob/1c5d42beb24144c3fdcccb39f032eb6842395b05/normalize.pl#L87
reorganized my research from 2 yrs ago.
https://github.com/yuuki15/24
① 5 * 2 + 1 - 1
② 5 * 2 * 1 * 1
③ 5 / (1 - (1 / 2))
all of the above equals 10.
but you'd see ① and ② similar, ③ quite different.
i was working on formulating this difference.