# Chess software development

**URL:** <http://community.robotshop.com/forum/t/chess-software-development/8733>\
**Category:** General Discussions\
**Tags:** legacy, perl, chess\
**Created:** [November 21, 2010, 2:17am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733 "2010-11-21T02:17:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrickmccabe](http://community.robotshop.com/forum/letter_avatar/patrickmccabe/32/6_449c533f586939b6e5f246632a46421f.png) [@patrickmccabe](http://community.robotshop.com/forum/u/patrickmccabe)\
**Post date:** [November 21, 2010, 2:17am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/1 "2010-11-21T02:17:27Z")

</div>

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&nbsp;separate script from my perl script.

This chess script&nbsp;displays&nbsp;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.&nbsp;

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

---

<div class="post-metadata">

**Author:** ![joc](http://community.robotshop.com/forum/letter_avatar/joc/32/6_449c533f586939b6e5f246632a46421f.png) [@joc](http://community.robotshop.com/forum/u/joc)\
**Post date:** [November 21, 2010, 2:28am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/2 "2010-11-21T02:28:33Z")

</div>

**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!

---

<div class="post-metadata">

**Author:** ![rik](http://community.robotshop.com/forum/letter_avatar/rik/32/6_449c533f586939b6e5f246632a46421f.png) [@rik](http://community.robotshop.com/forum/u/rik)\
**Post date:** [November 21, 2010, 4:39am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/3 "2010-11-21T04:39:42Z")

</div>

**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](http://perldoc.perl.org/perlipc.html#Bidirectional-Communication-with-Another-Process) 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](http://search.cpan.org/search?query=chess&mode=module)?

---

<div class="post-metadata">

**Author:** ![robotfreak](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/robotfreak/32/204_2.png) [@robotfreak](http://community.robotshop.com/forum/u/robotfreak)\
**Post date:** [November 21, 2010, 5:32am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/4 "2010-11-21T05:32:22Z")

</div>

**Maybe Micro-Max is a way.**

Maybe [Micro-Max](http://home.hccnet.nl/h.g.muller/max-src2.html) 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](http://chessprogramming.wikispaces.com/)

---

<div class="post-metadata">

**Author:** ![ultramagnus](http://community.robotshop.com/forum/letter_avatar/ultramagnus/32/6_449c533f586939b6e5f246632a46421f.png) [@ultramagnus](http://community.robotshop.com/forum/u/ultramagnus)\
**Post date:** [November 21, 2010, 6:12am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/5 "2010-11-21T06:12:41Z")

</div>

**ippolit**

[ippolit](http://ippolit.wikispaces.com/) is a open source chess program you can modify and embed a lot easier.&nbsp; It also happens to be the strongest chess engine to run on a PC. (ie, not a super computer or cluster)

---

<div class="post-metadata">

**Author:** ![patrickmccabe](http://community.robotshop.com/forum/letter_avatar/patrickmccabe/32/6_449c533f586939b6e5f246632a46421f.png) [@patrickmccabe](http://community.robotshop.com/forum/u/patrickmccabe)\
**Post date:** [November 21, 2010, 10:30am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/6 "2010-11-21T10:30:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![christhecarpenter](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/christhecarpenter/32/38394_2.png) [@christhecarpenter](http://community.robotshop.com/forum/u/christhecarpenter)\
**Post date:** [November 21, 2010, 11:48am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/7 "2010-11-21T11:48:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![patrickmccabe](http://community.robotshop.com/forum/letter_avatar/patrickmccabe/32/6_449c533f586939b6e5f246632a46421f.png) [@patrickmccabe](http://community.robotshop.com/forum/u/patrickmccabe)\
**Post date:** [November 21, 2010, 11:52am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/8 "2010-11-21T11:52:26Z")

</div>

**Yeah they work. Just**

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

---

<div class="post-metadata">

**Author:** ![ultramagnus](http://community.robotshop.com/forum/letter_avatar/ultramagnus/32/6_449c533f586939b6e5f246632a46421f.png) [@ultramagnus](http://community.robotshop.com/forum/u/ultramagnus)\
**Post date:** [November 21, 2010, 12:22pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/9 "2010-11-21T12:22:12Z")

</div>

**yeah, no way that will run**

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

---

<div class="post-metadata">

**Author:** ![patrickmccabe](http://community.robotshop.com/forum/letter_avatar/patrickmccabe/32/6_449c533f586939b6e5f246632a46421f.png) [@patrickmccabe](http://community.robotshop.com/forum/u/patrickmccabe)\
**Post date:** [November 21, 2010, 1:14pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/10 "2010-11-21T13:14:44Z")

</div>

**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](http://home.hccnet.nl/h.g.muller/umax4_0.c) with some serial&nbsp;communication&nbsp;in C [http://todbot.com/blog/2006/12/06/arduino-serial-c-code-to-talk-to-arduino/](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.

---

<div class="post-metadata">

**Author:** ![robotfreak](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/robotfreak/32/204_2.png) [@robotfreak](http://community.robotshop.com/forum/u/robotfreak)\
**Post date:** [November 21, 2010, 3:09pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/11 "2010-11-21T15:09:11Z")

</div>

**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](http://www.andreadrian.de/schach/avrmax_48.c) for the [Shah chess computer](http://www.andreadrian.de/schach/#Selbstbau_Schachcomputer_SHAH). Don’t know if an Arduino port exists, this is normal AVR-C.

&nbsp;

&nbsp;

&nbsp;

&nbsp;

---

<div class="post-metadata">

**Author:** ![voodoobot](http://community.robotshop.com/forum/letter_avatar/voodoobot/32/6_449c533f586939b6e5f246632a46421f.png) [@voodoobot](http://community.robotshop.com/forum/u/voodoobot)\
**Post date:** [November 23, 2010, 11:58am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/12 "2010-11-23T11:58:14Z")

</div>

**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…

---

<div class="post-metadata">

**Author:** ![GroG](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/grog/32/62_2.png) [@GroG](http://community.robotshop.com/forum/u/GroG)\
**Post date:** [December 24, 2010, 3:12pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/13 "2010-12-24T15:12:58Z")

</div>

**Download / install**

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

Try this -&nbsp;[http://jlog.org/rxtx-mac.html](http://jlog.org/rxtx-mac.html)

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

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

&nbsp;

---

<div class="post-metadata">

**Author:** ![patrickmccabe](http://community.robotshop.com/forum/letter_avatar/patrickmccabe/32/6_449c533f586939b6e5f246632a46421f.png) [@patrickmccabe](http://community.robotshop.com/forum/u/patrickmccabe)\
**Post date:** [December 24, 2010, 3:29pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/14 "2010-12-24T15:29:35Z")

</div>

**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.&nbsp;

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

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.

---

<div class="post-metadata">

**Author:** ![GroG](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/grog/32/62_2.png) [@GroG](http://community.robotshop.com/forum/u/GroG)\
**Post date:** [December 24, 2010, 3:38pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/15 "2010-12-24T15:38:43Z")

</div>

**No Worries**

Great, I like your determination…

Alright, &nbsp;Quick summary win-win situation:  
  
If you use MyRobotLab you get to interface with all sorts of&nbsp;possibilities, and all sort of Services created by the wonderful open source community ! &nbsp;MyRobotLab is a kind of glue between all the Services. &nbsp;So that’s a bonus for you.

A bonus for me would be a person (besides myself) actually using it for a project. &nbsp;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. &nbsp;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 -&nbsp;[http://www.eclipse.org/downloads/](http://www.eclipse.org/downloads/)&nbsp;&nbsp;- “Eclipse IDE for Java Developers”

&nbsp;

---

<div class="post-metadata">

**Author:** ![GroG](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/grog/32/62_2.png) [@GroG](http://community.robotshop.com/forum/u/GroG)\
**Post date:** [December 24, 2010, 4:19pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/16 "2010-12-24T16:19:53Z")

</div>

**Wow !**

I downloaded the source - it looks well designed, with graphics&nbsp;separated&nbsp;from game & ai. &nbsp;The only compiling errors are junit tests. &nbsp;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? &nbsp;Seems like a logical step, no?

 ![chess.png](http://community.robotshop.com/forum/uploads/default/original/2X/8/8ed6075605e0abcbee9d5c0865efdd068692a436.png)

---

<div class="post-metadata">

**Author:** ![GroG](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/grog/32/62_2.png) [@GroG](http://community.robotshop.com/forum/u/GroG)\
**Post date:** [December 24, 2010, 4:42pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/17 "2010-12-24T16:42:10Z")

</div>

**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). &nbsp;Do it in French though 😃 . &nbsp;

&nbsp;&nbsp; &nbsp;final Game partie = new Game();

&nbsp;&nbsp; &nbsp;Player joueur = partie.getPlayer(true);

&nbsp;&nbsp; &nbsp;joueur.setName(“Human”);

&nbsp;&nbsp; &nbsp;joueur.setEngine(null);

&nbsp;&nbsp; &nbsp;joueur = partie.getPlayer(false);

&nbsp;&nbsp; &nbsp;joueur.setName(“Computer”);

&nbsp;&nbsp; &nbsp;final Engine moteur = EngineFactory.newInstance();

&nbsp;&nbsp; &nbsp;moteur.setOpeningsEnabled(false);

&nbsp;&nbsp; &nbsp;moteur.setEndgamesWSEnabled(false);

&nbsp;&nbsp; &nbsp;joueur.setEngine(moteur);

---

<div class="post-metadata">

**Author:** ![patrickmccabe](http://community.robotshop.com/forum/letter_avatar/patrickmccabe/32/6_449c533f586939b6e5f246632a46421f.png) [@patrickmccabe](http://community.robotshop.com/forum/u/patrickmccabe)\
**Post date:** [December 24, 2010, 4:54pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/18 "2010-12-24T16:54:51Z")

</div>

**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?

---

<div class="post-metadata">

**Author:** ![GroG](http://community.robotshop.com/forum/user_avatar/community.robotshop.com/grog/32/62_2.png) [@GroG](http://community.robotshop.com/forum/u/GroG)\
**Post date:** [December 25, 2010, 9:40am UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/19 "2010-12-25T09:40:38Z")

</div>

**There would be a few design**

There would be a few design considerations to think about. &nbsp;

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)? &nbsp;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

&nbsp;

---

<div class="post-metadata">

**Author:** ![patrickmccabe](http://community.robotshop.com/forum/letter_avatar/patrickmccabe/32/6_449c533f586939b6e5f246632a46421f.png) [@patrickmccabe](http://community.robotshop.com/forum/u/patrickmccabe)\
**Post date:** [December 25, 2010, 12:46pm UTC](http://community.robotshop.com/forum/t/chess-software-development/8733/20 "2010-12-25T12:46:51Z")

</div>

**No intertoobs. Im interested**

No intertoobs. Im interested more in the chess engine itself. Getting communication with it because&nbsp;obviously&nbsp;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)

[Next page](http://community.robotshop.com/forum/t/chess-software-development/8733.md?page=2)
