Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How the hell does the AI work? It can't be included in that 1 kb, surely!


It seems to me it is not a "real" AI. I began a game, and after complete development on my side (about 5-6 moves), the opponent AI did only developed pawns, which shows off its limits.

I am not a javascript expert. but given the size of the code, I doubt there is a great IA underluying. Actually I've browsed the mignified code in order to find the AI implementation. The only clue I spot was a call to the Random() function. I won't state it for sure, because I wasn't able to understand the whole code. But I highly guessed it is the basis of the AI implementation. :-)


Play a full game and you'll be surprised, the AI is actually surprisingly good and gets better as the game progresses, especially given the size of the code.


Where's the unobfuscated code? I haven't been able to find it...


I am not sure you will find. It seems to me that the point of this demo is to submit minified javascript code for an online coder competition.


Ah, hmm, too bad... It would have been interesting.


One can write a decent negamax AI in < 10 lines of code.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: