3 ms·
I've managed to get the random AI into a state where it only had one possible move, and this ended up freezing my browser.
by FreeFull 8y ago
I've managed to get the random AI into a state where it only had one possible move, and this ended up freezing my browser.
- jstanley 8y agoSorry about that, I'd not come across such a situation while testing it. It poses a gameplay question as well: if you put your opponent in a position where there are no legal moves, have you won or is the game drawn? I believe in chess for example the game would be considered drawn rather than won.
- FreeFull 8y agoThe random AI probably should give up if it's unable to find a move after some time. Maybe if you don't see a move you can make, you can offer to draw, and your opponent gets to try and make a move for you. If the opponent can't find a move for you either, they have to concede and draw.