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. 

Could you just pipe the

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!

perl mage level +10

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?

Maybe Micro-Max is a way.

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

ippolit

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)

The micro-max looks like the

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.

Off the subject…

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

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

yeah, no way that will run

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

I think i am going to be

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.

Sorry, this version of

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.

 

 

 

 

If you could find a server

If you could find a server type chess engine, you could then just write a simple serial to tcp port and do all intercomunication that way. I did see a web based one while doing a quick search for a java chess engine…

Download / install

Hi Patrick - the serial input/output is accessable through rxtx jna/jni interfaces

Try this - http://jlog.org/rxtx-mac.html

It says … 10.5 I’m curious if it will work with 10.6

Ever used eclipse?  Or worked with Java?  Do you want to?

 

No i never used eclipse nor

No i never used eclipse nor worked with java. That is why i feel much of this is well over my head. But i am trying to do what ever it takes to get communication with a chess engine running on my computer. So i am willing to take many different avenues because i just need to find one that works. 

I would download that software, but i am not too sure what it does. 

That java chess software you linked me is very cool. Lots of different options to play with in it when it comes to picking the chess engine and depth of search.

No Worries

Great, I like your determination…

Alright,  Quick summary win-win situation:

If you use MyRobotLab you get to interface with all sorts of possibilities, and all sort of Services created by the wonderful open source community !  MyRobotLab is a kind of glue between all the Services.  So that’s a bonus for you.

A bonus for me would be a person (besides myself) actually using it for a project.  Your feedback will (in the long run) will make it easier for others to use the framework…

I have downloaded the chess engine source.

As to “i am not too sure what it does.” - I’ll tell you.
Java run in a Java Virtual Machine, which abstracts the hardware.  For actual communication to the hardware, interfaces need to be used - This specific download allows Java to communicate through serial ports.

I would suggest downloading and installing eclipse from here - http://www.eclipse.org/downloads/  - “Eclipse IDE for Java Developers”

 

Wow !

I downloaded the source - it looks well designed, with graphics separated from game & ai.  The only compiling errors are junit tests.  The game as an application looks even more fully featured than the applet.

Well, hmm looking at it a little deeper, I’m wondering if they did or did not make a clean interface to the game engine…

This is what the graphics application looks like - So, what have you got planned - do you want to interface this graphics in an applet form to your system?  Seems like a logical step, no?

Here is the guts of it

Found in DemoApplet.java :

You make a Game, make a human player, make another player, associate it with a Game Engine - Start a thread and start playing (setting moves).  Do it in French though :smiley: .  

    final Game partie = new Game();

    Player joueur = partie.getPlayer(true);

    joueur.setName(“Human”);

    joueur.setEngine(null);

    joueur = partie.getPlayer(false);

    joueur.setName(“Computer”);

    final Engine moteur = EngineFactory.newInstance();

    moteur.setOpeningsEnabled(false);

    moteur.setEndgamesWSEnabled(false);

    joueur.setEngine(moteur);

My main goal is make my

My main goal is make my chess robot smarter by giving it access to a good engine. No doubt interfacing with the graphics would be cool and maybe not too much harder than just accessing the engine? probably the same thing no?

There would be a few design

There would be a few design considerations to think about.  

1. Are you still interested in it being played by remote users on the InterToobs?

2. Do you need one person to play an entire game (or until they quit) and others the capability to watch (ie. their graphics get updated)?  Or should it be first come first serve for 1 move at a time?

3. I don’t believe JChecs is designed to be client/server - there is no networking component, the game and the gui are deployed as one unit - This would work fine locally, but it would need a little hacking to make it work over the InterToobs

 

No intertoobs. Im interested

No intertoobs. Im interested more in the chess engine itself. Getting communication with it because obviously it is a good chess engine. The graphics would be cool but my goal right now is having your program do the move generation and having my robot make that best move. Right now i hope this can be done maybe with out the need of the Gui and just have the robot be played as intended (that is by standing in front of it and pushing its buttons)