Wednesday, January 23, 2013

Chess engine?

Yeah, I was thinking about connecting some chess engine to my game. Of course, I want to have a Player vs CPU option so there must be some AI. I had 3 ways to do it:
  1. Write my own chess AI algorithm
  2. Use a freeware chess engine
  3. Find some simple open source chess game and copy/paste game logic from it.
Guess what I choose.

I really don't think writing my own AI would be a good idea, it's a problem for a month alone. I just want to make a chess game, why breaking a open door?
There's a lot of ready-to-go chess engines over the Internet. It's a small, individual program that can make a chess decisions and communicate with a chess GUI by standard system pipes. Personally I think that it's the best idea - I just need to write some communication protocol based on the UCI or something. So I take a look over the Internet. OMG. After hours of searching I've found the article that describes this problem best:
http://novelthought.org/talking-to-chess-ai-using-c/
And my reaction was:
OK, so here's my try. I've found this:
https://github.com/tobijk/simple-chess

Yesterday I've made a Player vs Player possible version, so adding a CPU option to this should be quite simple. Today I'll try to connect these functions above...


No comments:

Post a Comment