🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Game of Chess Day 1

Published March 08, 2019
Advertisement

About 24 hours after starting, here is a video. I have most of the rules implemented in a generic way (still to do en passant, castling and double pawn moves but these may be treated as special cases). As you move it calculates which pieces you are threatening and which threaten you. These are highlighted in red and green.

I will use a heuristic combining the number of your pieces threatened and the number of the enemy threatened for the AI, to help decide on the next move.

Previous Entry Game of Chess
3 likes 3 comments

Comments

Rutin

Nice work. :) 

March 08, 2019 03:38 PM
lawnjelly

AI opponent is now working! :) I had a couple of bugs to fix in the pawn direction and heuristic where it was producing crazy moves, but the moment I knew it was working when it thrashed me within about 10 moves.

Ok I'm not very good chess player, but it was amazing to see how good it is from some simple rules. At the moment it is only doing 1 move lookahead. I will try and write another blog post showing it tomorrow and hopefully have some more improvements.

March 08, 2019 07:08 PM
Rutin

I cannot wait to see what you show in your blog post! :) I'm almost ready for my post as well. Just fixing up some small stuff... You're well ahead of me that is for sure! I'm not very good at committing to times haha... always get pulled away by other things. :D I'm amazed how fast you're putting this together! Keep it up!

March 08, 2019 07:45 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement