Jump to content
  • Advertisement

Game of Chess Day 1

lawnjelly

651 views

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.



3 Comments


Recommended Comments

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.

Share this comment


Link to comment

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!

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!