Closed NechZ closed 1 year ago
Ive tried setting the value of the king to 0
Tried to play against your bot, I did see suspiciously many king moves, however they were happening with both colors and not towards the corner. It would help if you have some move series for white to play (as a human) which would evoke the behavior your described.
I fixed it!
It turned out I was starting the minimax function in the think function with "is maximising player" as false regardless of the color of the bot.
Closed!
Using the minimax algorithm, the bot wins almost every game with the white pieces, with the black ones however the black king sprints to the a1 square as soon as he can and that is really devastating because neither I nor the forums I asked around in can spot the bug. What is most curious is that it truly thinks moving to the a1 square is gonna be good because the default move (should no move be better than the other) is a random move from the legal move array and there are plenty moves to choose from aside moving king to a1.
Please help, this is giving me a headache