Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Programming piece table

Author: Inmann Werner

Date: 07:07:57 04/21/98

Go up one level in this thread


Thank you all very much for your answers.
I have read your suggestions, and outcomes "my version", I will try.
Comments welcome.

It´s nice to see, that in this forum, also chess programming is
discussed (the thing, I am interested) and not only
Politics and commercial programs.
I am astonished, that you all answer so nice and free, tell your tricks,
and discuss them. I feared, that everybody "sits" on his tricks and says
"do whatever you want". Again, Thanks!

About my idea.

I will use my piece list as i described. Also I will use my board with
pointers to the piecelist. In Do-Move and Undo_move, the piece list gets
changed, and the board pointer list to the piece list.
 I always intended to rebuild the list (and much more lists!!) at the
root. There, time does not matter really. In the move Generator and
evaluation, I use the number of pieces, i got at the root.

My new idea:

The Move Generator fills a structure (see below), I use in Alpha_Beta
and Do-move and Undo-move.
 I will add the field 'beaten_fig_pointer' to the structure. Normally, I
will let the status of the field undefined until in Do-Move, a piece is
beaten. If this occurs, I write the index of the piece in the piece list
in the new field beaten_fig_pointer, mark the field in the piece list as
empty, and hope have no problem in undo_move.
I think, this could be fast.

Struct movetyp
{
char from
char to
char beaten_figure            (1 for pawn, 5 for queen etc.)
char promote figure          (--"--)
char rochade                     (1 for small,2 for big rochade)
char ep_field                     (for epassant beats)
int  evaluate                      (for move ordering)
char beaten_fig_pointer    (the new field for do_move and
undo_move)!!!!!!
}
movetyp  STAPEL[1510]

P.S:
I have not introduced me, sorry.
I am 36 years old and computer programmer, living in south Germany.
Since one year, i write "my chessprogram", inspired from an article of
Mr Donninger (Nimzo) in MS-DOS international. I read much articles about
chessprogramming ( in internet). Now I am writing my Version2 Program.
Version1 played fair well (with Position Tests and some playing against
other Programs about 2050 ELO on P90), I had included Hashtables,
NullMoves,KillerMoves,Permanent Brain etc., and at the end, the program
was unreadable and rather ugly code at all. Also there where to much
slow code, out of the idiotic data structure, I used. So I began to
write Version2 and hope, it will be faster and better.

Chess programming is something for training my brain. After writing the
20th business program, you cant see that stuff anymore.

Werner




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.