A minimax chess engine in regular expressions
nicholas.carlini.com
A minimax chess engine in regular expressions
1–10 of 103 posts
Re: A minimax chess engine in regular expressions
#2Re: A minimax chess engine in regular expressions
#3God bless our soldiers who see that regex is turing complete and choose to implement fun programs. Yall are truly a different breed :)
Re: A minimax chess engine in regular expressions
#4Of course, the sed version does make use of control flow commands in sed and only probes 1ply (I think) so this version is significantly different in that regard.
Re: A minimax chess engine in regular expressions
#5Re: A minimax chess engine in regular expressions
#6“Now comes the clever part.” God bless our soldiers who see that regex is turing complete and choose to implement fun programs. Yall are truly a different breed :)
> Because our program just consists of a sequence of regular expressions, you can't loop at all! That, technically, means we can't actually perform Turing Complete But we can do any bounded computation by just unrolling any loops we may have.
Although some (most?) implementations may be. Though by the above quote, the author didn't make use of that.
Re: A minimax chess engine in regular expressions
#7This is from the same gentleman who (among other things) demonstrated that printf() is Turing complete and wrote a first person shooter in 13kB of Javascript. https://github.com/HexHive/printbf https://github.com/carlini/js13k2019-yet-another-doom-clone
Not gonna lie, I thought that sentence would end with the FPS being done in printf.