Cool writeup. I botched an implementation of negamax[0] for a coding interview for CMG a few years back.
Ultimately with algorithms like minimax or negamax if your scoring / winning algorithm is slow this will compound on top of that. I didn't dig in deep to OPs code nor do I "know" ruby but a quick glance at the scoring / checking code and I saw a yield in use so that's good :D
Ultimately with algorithms like minimax or negamax if your scoring / winning algorithm is slow this will compound on top of that. I didn't dig in deep to OPs code nor do I "know" ruby but a quick glance at the scoring / checking code and I saw a yield in use so that's good :D
[0] https://en.wikipedia.org/wiki/Negamax