Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old April 6th 04, 06:45 PM
Christian Davén
 
Posts: n/a
Default Simple Chess Engine

Dear experts (and others),

We're working on a simple chess engine for school. There will be a
tournament between the engines, although winning isn't required to
pass the course. There are a few special rules to simplify (and
complicate) things for us:

* 30 seconds per move
* 15 minutes per game
* no castlings
* no en passants
* no pawn promotions
* the king and queen switch places

I'm wondering what you think will be the most important thing in
this kind of chess game. Since there will be ~15 moves per game and
there are some special rules it's hard for me as a novice to tell.

We know a bit about AI, but are no experts (enough to have
implemented some simple machine learning and alpha-beta pruning).
Some questions for you:

* What should we implement first in the evaluator?
* What ways are there to speed up the search? (I've heard about
null-move pruning, but don't understand how to implement it.)
* What use is a database of previously played games? I've
downloaded some hundred thousand games and can write programs to
extract almost any data from them. How would they be useful?
* Other tips or suggestions?

We've got a month, it's allowed to use existing source code
(preferably Java), and we want to win!

--
c.

"Life is just a big smörgĺsbord"
  #2   Report Post  
Old April 6th 04, 11:29 PM
Simon Waters
 
Posts: n/a
Default Simple Chess Engine

Christian Davén wrote:

* What should we implement first in the evaluator?


Material

* What ways are there to speed up the search? (I've heard about
null-move pruning, but don't understand how to implement it.)


If you are allowed to reuse existing code why not take a program and cut
out the rules that don't apply - probably quicker and more reliable than
implementing these things from scratch, as you are mostly cutting out
all the special cases.

What happens to pawns on the eighth?

* What use is a database of previously played games? I've
downloaded some hundred thousand games and can write programs to
extract almost any data from them. How would they be useful?


Zero value - the rules have changed so nothing useful is likely to be
gained.

Without castling (or promotions) getting the rooks into play will be an
issue - but you may not have to change an existing program in this
regard as they should work it out. However you may find rooks are far
less valuable as a result of the rule changes, and other special cases
are less common (open files will be rarer).

-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAcy9eGFXfHI9FVgYRAs+2AJ0a51rBrvUiDyfGSh6dzM ciEvvsagCfarvn
No1Fxt0v4MeCcNan/gpWfZM=
=SW/3
-----END PGP SIGNATURE-----

  #3   Report Post  
Old April 7th 04, 11:58 AM
pcsol
 
Posts: n/a
Default Simple Chess Engine

"Christian Davén" wrote in message ...
Dear experts (and others),

We're working on a simple chess engine for school. There will be a
tournament between the engines, although winning isn't required to
pass the course. There are a few special rules to simplify (and
complicate) things for us:

* 30 seconds per move
* 15 minutes per game
* no castlings
* no en passants
* no pawn promotions
* the king and queen switch places


As the other poster said, what happens to pawns on the 8th rank?
Do they just stop? If so, its a very different game to Chess..

I'm wondering what you think will be the most important thing in
this kind of chess game. Since there will be ~15 moves per game and
there are some special rules it's hard for me as a novice to tell.

We know a bit about AI, but are no experts (enough to have
implemented some simple machine learning and alpha-beta pruning).
Some questions for you:

* What should we implement first in the evaluator?


Material, Mobility, etc.

* What ways are there to speed up the search? (I've heard about
null-move pruning, but don't understand how to implement it.)
* What use is a database of previously played games? I've
downloaded some hundred thousand games and can write programs to
extract almost any data from them. How would they be useful?


Doesnt help much if you change the rules..

* Other tips or suggestions?


Loads of sample source on the net, ie see Tom Kerigans Simple C
program
http://home.comcast.net/~tckerrigan/

I guess they changed the rules to stop people pasting in such code!



We've got a month, it's allowed to use existing source code
(preferably Java), and we want to win!


Since you have a limited time, you will need to keep things fairly
simple, especially if you are not familiar with writing tree searches
for games. Dont use Java though, unless you can use a compiler on it -
otherwise its going to be a lot slower than a compiled C++ program..

ade
-------------------------------------------
Chess & Checkers?
http://www.chessandcheckers.com
ChessGenius for the PC
  #4   Report Post  
Old April 7th 04, 01:14 PM
Mikko Nummelin
 
Posts: n/a
Default Simple Chess Engine

On Wed, 7 Apr 2004, pcsol wrote:

Loads of sample source on the net, ie see Tom Kerigans Simple C
program
http://home.comcast.net/~tckerrigan/

I guess they changed the rules to stop people pasting in such code!


I think the main evaluation differences are that pieces are more valuable
and the more backward the pawns are, the more valuable. Draw is very
probable result in games with those rules, because pawns are no more
enough to force mate.

Second, it is illegal to cut and paste from copyrighted software unless
given permission from the author. This applies also to GPLed programs
if the modified source is not available but binaries are spread. In school
works there might be also explicit rules to prohibit copying from someone
else's work.


Mikko Nummelin
  #5   Report Post  
Old April 16th 04, 09:16 AM
Christian Davén
 
Posts: n/a
Default Simple Chess Engine

Simon Waters wrote,

What happens to pawns on the eighth?



Well, I guess they become cannon fodder.

Thanks for your suggestions! My news server was down for a week so I
haven't been able to get back to you before now.

We use the code for JavaChess by Laramée and modify it to fit our
rules and needs. And I'm working on improving the history heuristic
so that it will sort the moves by captured pieces first.

I tested the algorithm (alpha-beta, iterative deepening,
transposition tables, history heuristic, mtdf) and it was incredibly
quick. It almost feels as if I removed some vital part from the
program! With this Java code I reach ply 6 in 11 seconds on my Athlon
XP 1700+. Is that reasonable?

Another thought, for this tournament we may get several computers to
run our program on (a multi-agent system), so we're thinking of
distibuting the search algorithm so that machine 1 searches half of
the positions on ply 1 and machine 2 the other half. Is there a
smarter way to utilise many computers?

--
c.

"Life is just a big smörgĺsbord"
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 01:05 PM.

Powered by vBulletin® Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright ©2004-2019 ChessBanter.
The comments are property of their posters.
 

About Us

"It's about Chess"

 

Copyright © 2017