Reply
 
LinkBack Thread Tools Display Modes
  #1   Report Post  
Old April 15th 04, 06:02 PM
Tommy
 
Posts: n/a
Default openings

hello,

where can I find an opening file, easy to parse, for my chess engine?

Thanks,

Tommy

  #2   Report Post  
Old April 15th 04, 06:57 PM
Mikko Nummelin
 
Posts: n/a
Default openings

On Thu, 15 Apr 2004, Tommy wrote:

hello,

where can I find an opening file, easy to parse, for my chess engine?


Get any PGN files collection. For parsing them, _either_ look hints for it
from some open-source code, i.e. Crafty, but don't forget to ask
permission before any 'copy-pasting' _or_ implement a parser of your own.
Notice that you don't have to parse everything, "Result"-field, converting
SAN moves to coordinate-algebraic and noticing when an individual game
ends should be enough.


Mikko Nummelin
  #3   Report Post  
Old April 15th 04, 09:29 PM
Simon Waters
 
Posts: n/a
Default openings

Mikko Nummelin wrote:

where can I find an opening file, easy to parse, for my chess engine?



Get any PGN files collection.


But if you need to redistributed it when your program is ready be sure
it is free of copyright material, such as comments you don't have rights on.

As far as I know the GNU Chess book consists entirely of information
that is freely redistributable, has no comments, and should conform
exactly to the PGN standard (version 1.00 of the file had some missing
quotes).

http://ftp.gnu.org/pub/gnu/chess/book_1.01.pgn.gz (or all good mirrors).

It was moved out of the GNU Chess distribution for a number of reasons.

It makes the distro too big.

Chess game collections are useful in their own right.

The copyright position on chess games is potentially unclear
(I'd argue the moves are usually a factual record of a public event).

If you can't parse this, and it isn't your PGN parsers fault, let me know.

SCID was used in the preparation of the GNU Chess book.


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

iD8DBQFAfvChGFXfHI9FVgYRAoxGAKCAAbRyloOPqdrhiy5aSp HCra+64gCgqtfM
w0za2fUeE4ZsP7toUKZIAHw=
=5Bvq
-----END PGP SIGNATURE-----

  #4   Report Post  
Old April 18th 04, 06:07 PM
Daniel Lidstrom
 
Posts: n/a
Default openings

On Thu, 15 Apr 2004 17:02:29 +0000, Tommy wrote:

hello,

where can I find an opening file, easy to parse, for my chess engine?


It is a mistake to use opening moves that your engine did not find
himself. Use a book-learning algorithm such as the one by Michael Buro
[1] or drop-out expansion [2]. One example to illustrate this: suppose the
opening moves get your program in a position that the program actually
does not like. It will try to shuffle the pieces around to reach a
position it does like. You see the problem?

[1] http://www.cs.ualberta.ca/~mburo/publications.html
[2] Don't have a reference, sorry. But it is similar to above.

--
Daniel

  #5   Report Post  
Old April 19th 04, 01:06 AM
Tommy
 
Posts: n/a
Default openings


"Daniel Lidstrom" wrote

It is a mistake to use opening moves that your engine did not find
himself.


Why? My chess program is not 2800 Elo, it probably is around 1800 Elo and it
is weak in the opening phase, so I thought that any good opening book would
help....

Use a book-learning algorithm such as the one by Michael Buro
[1] or drop-out expansion [2]. One example to illustrate this: suppose the
opening moves get your program in a position that the program actually
does not like. It will try to shuffle the pieces around to reach a
position it does like. You see the problem?


I understand, the article you pointed me to is really interesting and one
day I might implement that.

For now I wanted something very simple a file like:

FEN - best move
FEN - best move
FEN - best move



  #6   Report Post  
Old April 19th 04, 01:11 AM
Tommy
 
Posts: n/a
Default openings


"Tommy" wrote

For now I wanted something very simple a file like:

FEN - best move
FEN - best move
FEN - best move


(message got posted by accident....)

so that instead of having to analyse a position I can first see if it is in
the opening book (which I would load from a file and store in memory). If it
is on the book I assume that the suggested best move is better than what my
program could find in 5 seconds or even 30 minutes.

I understand what I am asking is trivial and not a very good thing to do,
but I am sure it would still make my program stronger without too much
effort. The problem is that I cannot edit such a file myself (a few thousand
entries?) and I do not know where to find one.

As for the good way of implementing this, the one you suggested, I will
someday have a go at it.

Thank you very much,

Tommy

  #7   Report Post  
Old April 19th 04, 02:50 AM
Noah Roberts
 
Posts: n/a
Default openings

Tommy wrote:
"Tommy" wrote


For now I wanted something very simple a file like:

FEN - best move
FEN - best move
FEN - best move



(message got posted by accident....)

so that instead of having to analyse a position I can first see if it is in
the opening book (which I would load from a file and store in memory). If it
is on the book I assume that the suggested best move is better than what my
program could find in 5 seconds or even 30 minutes.

I understand what I am asking is trivial and not a very good thing to do,
but I am sure it would still make my program stronger without too much
effort. The problem is that I cannot edit such a file myself (a few thousand
entries?) and I do not know where to find one.

As for the good way of implementing this, the one you suggested, I will
someday have a go at it.


Simply change it to:
FEN - moveA score, moveB score, moveC score

Then when you win/lose/draw you have kept track of what book moves you
made and adjust the score for those moves. You then randomly choose a
move but weigh by score.

num = rand() % sum_of_all_scores;
i = 0;
while (n moves[i].score) { i++; n -= moves[i].score; }
bestmove = moves[i].move;
score = moves[i].score;

--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush

  #8   Report Post  
Old April 19th 04, 12:09 PM
Tommy
 
Posts: n/a
Default openings


"Noah Roberts" wrote
[i]
Simply change it to:
FEN - moveA score, moveB score, moveC score

Then when you win/lose/draw you have kept track of what book moves you
made and adjust the score for those moves. You then randomly choose a
move but weigh by score.

num = rand() % sum_of_all_scores;
i = 0;
while (n moves[i].score) { i++; n -= moves[i].score; }
bestmove = moves[i].move;
score = moves.score;


yeah, you are right!
Do you know how could I start building this file?
If I use my engine to build it I fear that the file will contain very poor
openings as my engine is still not very strong in the opening phase.

Tommy

  #9   Report Post  
Old April 20th 04, 03:18 AM
Noah Roberts
 
Posts: n/a
Default openings

Tommy wrote:[i]
"Noah Roberts" wrote

[i]
Simply change it to:
FEN - moveA score, moveB score, moveC score

Then when you win/lose/draw you have kept track of what book moves you
made and adjust the score for those moves. You then randomly choose a
move but weigh by score.

num = rand() % sum_of_all_scores;
i = 0;
while (n moves[i].score) { i++; n -= moves[i].score; }
bestmove = moves.move;
score = moves.score;



yeah, you are right!
Do you know how could I start building this file?
If I use my engine to build it I fear that the file will contain very poor
openings as my engine is still not very strong in the opening phase.


By hand. It might be prudent to create an opening book editor. What I
did was take a bunch of lines, translate them into FEN followed by moves
as you are thinking, and never got to the point of weighting them. You
would probably pick some base score to start with and let the engine
modify them from there.

If you wanted to get really interesting you would have the engine create
its own book by having a score that means, "don't use this move, search
for another."


--
"I'm a war president. I make decisions here in the Oval Office
in foreign policy matters with war on my mind." - Bush

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Chess openings for kids - especially black response to 1. e4 Kenneth Sloan rec.games.chess.analysis (Chess Analysis) 15 September 4th 04 06:08 AM
Yahoo Unorthodox Chess Openings Newsgroups CLYDE NAKAMURA rec.games.chess.analysis (Chess Analysis) 0 June 12th 04 02:50 AM
Yahoo Unorthodox Chess Openings Newsgroups CLYDE NAKAMURA rec.games.chess.analysis (Chess Analysis) 0 April 18th 04 12:00 PM
How to handle bizarre moves during 'book' openings Patrick Hoerter rec.games.chess.analysis (Chess Analysis) 13 December 7th 03 05:19 AM
Unorthodox Chess Openings Newsgroups on Yahoo Clyde Nakamura rec.games.chess.analysis (Chess Analysis) 0 July 9th 03 08:48 PM


All times are GMT +1. The time now is 11:41 AM.

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