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.
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. 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).
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 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.
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.
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 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…
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.
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”
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?
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 .
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();
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 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)