Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Primitive Chess Program

12 views
Skip to first unread message

David Ewart

unread,
Jun 9, 1995, 3:00:00 AM6/9/95
to
Thought you might all be interested in a chess-playing program I wrote a
couple of years ago ... I didn't get the time to finish it.

First of all, I set up the interface so that it would accept legal moves
from two players playing a game. Then I got the computer to play ...

(i) First try - play any legal move at random

This obviously played pretty dismally, but at least it played. I was quite
proud of that!

(ii) First major refinement - position evaluation. I wanted to think of one
single parameter to evaluate all possible legal moves (just 1 ply ahead) and
get it to choose the best. The parameter I used was "total number of
squares controlled". I thought this might be reasonable. However, it very
quickly became apparent that this method was actually worse than playing at
random. It found that the best way to control lots of squares was to sling
its queen out into the middle of the battle, almost always open to capture.
I almost creased up with laughter when I played my first "game" against it.
I played White and it went something like: 1.e4 e6 2.Nf3 Qg5 ... Oh dear.

Dave.
--
-----------------------------------------------------------------------------
| Dave Ewart | ** WWW last changed 09/02/95 |"Turning in my sleep |
| ICRF CEU | ftp://ftp.icnet.uk/ | you call me a fool, |
| Radcliffe Infirmary | icrf-public/davee/index.html | To fall in love, |
| Oxford, UK | ew...@europa.lif.icnet.uk | is it so uncool?" |
-----------------------------------------------------------------------------

Thomas Leitgeb

unread,
Jun 9, 1995, 3:00:00 AM6/9/95
to
Every now and then I start discussions with my friends about a
little contest. Everyone writes a chess programm and then we let
these programms play one against the other (until now we could not
spare the time to do this).

Dave Ewart wrote:
> (ii) First major refinement - position evaluation. I wanted to think of one
> single parameter to evaluate all possible legal moves (just 1 ply ahead) and
> get it to choose the best. The parameter I used was "total number of
> squares controlled". I thought this might be reasonable. However, it very
> quickly became apparent that this method was actually worse than playing at
> random.

Some questions:

* you will have to use a single parameter, don´t you?

IMHO, if you have multiple parameters, you will not be able to
evaluate a move. You must add some sort of value to each parameter
to be able reach a decission - in other words, you use only one
parameter.

Thomas


David Ewart

unread,
Jun 9, 1995, 3:00:00 AM6/9/95
to
Thomas Leitgeb (thomas....@kfunigraz.ac.at) wrote:

: Dave Ewart wrote:
: > (ii) First major refinement - position evaluation. I wanted to think of one
: > single parameter to evaluate all possible legal moves (just 1 ply ahead) and
: > get it to choose the best. The parameter I used was "total number of
: > squares controlled". I thought this might be reasonable. However, it very
: > quickly became apparent that this method was actually worse than playing at
: > random.

: Some questions:

: * you will have to use a single parameter, don´t you?

: IMHO, if you have multiple parameters, you will not be able to
: evaluate a move. You must add some sort of value to each parameter
: to be able reach a decission - in other words, you use only one
: parameter.

Yeah, OK, what I meant was evaluating using a single component. I could
have looked at

(a) number of squares controlled
(b) material
(c) etc.

and weighted them to give a final figure as an evaluation, but I was working
on a very basic level.

0 new messages