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.

Well it does not do much now but here is the basic idea of what i am doing.

 

 

I think one of my goals is this...

To develop a chess engine, most likely along with a GUI, that can be communicated with via serial. Right now i am working on one in Processing, but i am writing it all which is something i wanted to avoid. I am no chess engine guru so i was hoping to be able to use an available chess engine online, but if none are adaptable to what i need then i guess i will be doing it myself. I see this program as being a good open source project for others to use in building chess related robots.

It should have a simple serial protocol where a move is inputed via the chosen com port at the chosen baud rate, the move gets displayed, the computer then responds via its chess engine, the response gets outputted over serial and displayed in the Gui. 

I might be crazy, but i know something like this would have been useful to me and probably others in the future. 

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 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)

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 :D .  

    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);

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?

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?

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 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.

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"