Here is my little project: A chess game for the Arduino Uno. It uses a graphics LCD as a user interface. Currently the DOGS102 shield and the DOGM128 shield are fully supported.The chess game will be part of the next release of the dogm128 library. Meanwhile the source is available on request or at the project home page (browse source):

The pieces look a bit flimsy, but still very good for a board of 64x64 pixels.

If your graphical lib is integrated in those 12 KB of flash, how many bytes did you actually need for the Game ?

Personally I wouldn't know where to start programming and getting it under 16 KB seems a big achievement to me. I don't know whether I'll do something with it, but I'd very much like to have a look at the sketch used.

Most important question... How does it play ?What response times do you get and is it able to offer you a worthy opponent ?

Please do tell us more, we are glued to our various screens! Especially the game engine...how did you start that, if you don't mind me asking.

"The really amazing thing is how many people are successful with their Arduino projects considering the fact that so many of them do not have a technical background. A lot of them seem to try, and succeed with, projects that no sane engineer would even attempt." - floresta commenting on the proper use of LCD displays

Here are some values on the program size Graphics Lib and Font data: 6 KB GUI, Bitmaps and Chess Engine: 5 KB

About the program development:

First I did research on existing chess engines. I found some verysmall (regarding code size) engines, but they seem to be very cryptic and still usea lot of ram. There is also one ATMEGA port of one engine, but I was notable to understand how to control that engine.

The other issue has been the copyright. Many implementation did not fit tothe LGPL, which had been the intended license for the chess game.

And finally, I wanted a small implementation for the Uno. This requiressome tricks in C...

... so I started writing my own implementation. First step had been to implementa "legal move finder". Once the program knows all legal moves for a colorand a given board setup, it is quite easy to setup a simple chess engine whichselects randomly a legal move.

I moved on and implemented a simple search algorithm for the best move.The current algorithm is quite simple: negamax. Best move rating is mainlybased on the material. If you loose a rook, it is rated as a bad move.

Most ideas and links are covered here:http://chessprogramming.wikispaces.com/

The most important improvement would be to implement alpha-beta search.But I first wanted something working before that.

Code is here:http://code.google.com/p/dogm128/source/browse/libraries/Dogm/utility/chess.c

Wow! I might win against a 32KB brain if I try my best. Never learned any techniques in chess. This is very cool! So what happened to the resistor in picture? Too large for back light so you put two parallel?

Oh, you noticed that little detail in the picture I simply did some experiments with the backlight. The shield is ok, but its documentation according to some specific backlight colors is a little bit incomplete (http://schmelle2.de/wp/arduino/shields/dogm128-shield).

I also wonder it is deterministic; would two identical plays (from the player perspective) cause two equal outcomes?

Do you use well known openings? Or do you use the search from the get-go?

I've also written a simple chess engine as a part of my bachelor degree, the Alpha-beta pruning search is actually the source for my alias (also my initials A.B. aligns well).Looks cool! I'll have a look at the source one of these days

The evaluation function looks for the number of pieces and how are pieces placed on the board. So I would call this "board focused".

The engine does not use any random function. If you play the same moves, the engine will react always in the same way.

The engine does not have any opening database. So far I did not add anything which was not strictly required... to keep the program size as low as possible.

The Alpha-beta pruning search is the topmost item on my TODO list for the game engine.However I did not fully understand that algorithm yet, so I am still afraid of its implementation.

This is a list of things which should be added:1. alpha-beta search2. dynamic depth/quiescent search3. end game improvements4. repetition and 50-move rule5. better, perhaps piece focused evaluation6. opening database

Anybody is welcome to contribute to the code at http://code.google.com/p/dogm128/And I guess Andy (http://arduino.cc/forum/index.php/topic,50524.0.html) still has some S102 shields available for testing the engine