Let's Make Robots!

Chess software development

Well i really want a good playing chess robot. I am no chess engine programming guru. So i decided that with my bi-directional wireless communication, i might as well have the chess program run on my computer and communicate with the robot. So i did some googling. Found that there are lots of chess engines that are meant to be communicated with. Well my mac already has one that i can play in terminal. That seems pretty bare bones and simple to communicate with. Now im just wondering how to communicate with a separate script from my perl script.

This chess script displays the chess board in terminal and accepts moves like "a2a4". Then it does some calculations and outputs its move and displays it. I need to be able to "put" moves in and "extract" its move. 

Any information you have, links, or key words i should be googling are going to very helpful. 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Could you just pipe the output from the chess program to your perl script, and vice versa for input?

Actually getting a continuous game going might be more difficult than I am imagining!

I looked into bidirectional pipes in perl. They are not for the faint of hearted. I've written quite some perl scripts, but that perldoc is scaring me. I happen to know Patrick is not an experienced perl monk. So I'd like to advice against it. Unless upping your perl skillz is the main motivation.

You might be better off with a chess engine that was designed to be embedded into a separate project. Did you search the CPAN?

ippolit is a open source chess program you can modify and embed a lot easier.  It also happens to be the strongest chess engine to run on a PC. (ie, not a super computer or cluster)

Maybe Micro-Max is a way. It's the smallest chess engine ever (133 lines of C-code) and it's open-source. Should run on every machine that has a C-compiler, (minimum is ATmega88).

Another ressource is the chessprogramming Wiki

The micro-max looks like the way to go. Working with it now, one problem is a that it has a huge array "HashTab[16777224]", arduino doesnt like that. I based my own chess code off of things i learned from that wiki, but mine just is too bulky and not the best at chess.

yeah, no way that will run on the arduino, it has practically nil ram.

Sorry, this version of Micro-Max won't run on an AVR or Arduino, you will need a recursive version like AVR-Max for the Shah chess computer. Don't know if an Arduino port exists, this is normal AVR-C.





I don't want to be a thread hijacker, but what's this I hear about you getting the God-awful X-bee 2's to work? Really? Two direction? I think you are the first if you did. I bow to you, sir.

Yeah they work. Just followed the tutorial http://t413.com/news/fast-2-way-xbee-series-2-data

I think i am going to be mixing the micro max chess engine http://home.hccnet.nl/h.g.muller/umax4_0.c with some serial communication in C http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/ and try and run this on my computer talking to my robot via Xbee.