Editable opening book Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Desired Features for Zillions of Games » Editable opening book « Previous Next »

Author Message
Mats W (Kålroten)
Posted on Sunday, October 16, 2005 - 11:34 am:   

There ought to be an editable opening book to many board games such as the different variants of chess and checkers, etc. Opening books increase the playing strength immensely because the program starts out correct from the beginning. It could be an editable text file.
Mats W (Kålroten)
Posted on Sunday, October 23, 2005 - 2:57 am:   

I want to underscore how important the notion of opening books are. It would increase the strength of many Zillions programs immensely. Commercial chess programs could not compete without sophisticated opening books.
Greg Schmidt (Gschmidt)
Posted on Wednesday, October 26, 2005 - 12:57 pm:   

I agree that the ability to construct opening books would be a useful feature, especially for Chess. I say especially for Chess because Chess openings have undergone so much analysis. I could be wrong, but for other games, I doubt that many Zillions developers would be motivated to analyze the openings and bother to create an opening book. So if this feature were to be added, I suspect it would not be widely used.
The goal of Zillions does not seem to be to create the strongest chess engine, but rather to allow any conceivable game to be programmed.

If new features were to be added to Zillions, my preference would be toward those features that have the ability to expand the feasible realm of games that are implementable by the Zillions engine. For example, a direct way to influence the Zillions position evaluator would likely have broader consequences. Also, the ability to count, etc., etc.
Mats W (Kålroten)
Posted on Thursday, October 27, 2005 - 12:03 am:   

Besides Chess, In Checkers, Shogi, Chinese Chess, and Go, etc., openings have been heavy analysed. The only thing one needs to do is to input the variations from one's "Beginner's Book on Openings" and the program will play *much* better. All the different Chess variations will play better, too. One problem in Chess is that the program makes excursions with the queen too early. Although this creates tactical possibilities the games are generally positionally lost after only a few moves. The point is also that a Checkers player, for instance, wants to train his favourite openings, so he wants to teach the program about these openings so he can get the best training result.

It's a tragedy that so many fine programs, Shogi et al., are almost useless to qualified players because there are no opening libraries. Often simple books are good enough.

The programs could, however, be used for position analysis if one could only clear the board instantly and set up positions. That's an easy fix, too. There should be an *analysis mode*, too, where one can see the actual best variation although the user is playing both sides. Commercial programs are typically used for analysis.

In Go one should also be able to create Joseki libraries. People who study these games would have much greater use for Zillions software if such libraries were possible to create.
Karl Scherer (Karl)
Posted on Friday, November 11, 2005 - 10:30 pm:   

Opening Books available in Zillions!!

It is indeed possible to implement opening book in Zillions!

My new game "Chess With Opening Books" game demonstrates how to do this (download now from http://karl.kiwi.gen.nz or from Zillions home page after tomorrow).

The game contins 15 sample Chess Opening Books
(A10-A99 of EOC) which I have written which you can select from a selection screen.

Chess players can now create their own Zillions chess rule file with their preferred
opening book.

During the game, hit key F7 to see which moves the opening book offers you.

A yellow marker at the left border indicates that the opening book is still active.
When there are no book moves left in a certain line, the marker will disappear and
the system will play chess just like the standard Zillions chess program would do.

With other words, the implemented opening book exactly behaves as one would expect from
an opening book.

The opening book implementation works perfectly in a play human against human.

When a human plays against the computer, the computer tends to choose the same subset
of the possible moves, and hence ignores some of the moves offered by the opening book.
Therefore you as the human player may have to choose the opponent's book move
(hit F7 first to see the options) if you want to use the full width of the
opening book. (Implementing the opponent as a random player does not work,
since once out of book we do not want the opponent to play random moves!)

The chess opening book used can be found as part of the rules file.
It is written as a collection of (pseudo-) Pawn moves (see further below for a technical description how they work).

The implemented opening book's characteristics:
- it is easy to read (collection of given moves formatted by indentation)
- it can be easily edited by you to your liking with any text editor
- it is arbitrarily and easily extendable (up to 18 ply deep at the moment).
- lines of variants do not have to be of same length

For details how to edit the opening books see the documentation in the rules files.
Write your own Zillions Opening Book and send mir your zrf file for inclusion in this
game's selection list!

It should be even possible now to create such a Zillions Chess Opening Book
from any text-based chess opening book via an appropriate translation program!

===============================================
What are PSEUDO-MOVES?

This is a concept I have never seen applied before by any author, and not even mentioned by anyone.

It is based on the fact that (for example) a move for a Pawn ("a1 from d6 to add") is executed
even if the piece on a1 is not a Pawn, but any
other piece of the same player.

We can call such a move a pseudo Pawn move.
I have implemented all whole Opening Books
as such pseudo moves.

This has big readability advantages compared to the option of associating all Rook moves with the rook etc.

Maybe you can come up with some other good uses for pseudo moves?

I am looking forward to hopefully seeing more Opening Books now being created by other authors!

Cheers, Karl
Mats W (Kålroten)
Posted on Saturday, November 12, 2005 - 12:40 am:   

Thanks a bunch!! If this works, then This is a vast improvement.

Mats
Mats W (Kålroten)
Posted on Saturday, November 12, 2005 - 1:57 am:   

Yes, this is a good idea! But it would be handy to have a little utility that converts textual opening information, such as below, to the zrf format, because it is not trivial to create the zrf-files.

On the link below you can download a full chess ECO list of openings in a similar format that Zillions uses, i.e. n1f3 etc (that is, not PGN).
http://www.rebel.nl/download/eco.zip
Mats W (Kålroten)
Posted on Saturday, November 12, 2005 - 8:56 am:   

A problem is that the engine always chooses the same move when there are alternatives in the book.
Karl Scherer (Karl)
Posted on Sunday, November 13, 2005 - 1:08 pm:   

The reason is that the ==> AI <== is designed to use what it 'thinks' is the 'best' move.
Opening book means that you have to 'ignore' this 'intelligence'. This would go against the idea of an 'AI' machine in the first place.

Therefor you can see that we have conflicting goals here. A solution to this problem would be
to be able to tell the program SEPARATELY FOR EACH MOVE move whether it has to do an 'intelligent' move or a 'random' move. This could be on the wish-list for a future version of Zillions.
Of course one can always ask for more...
(At the moment there is not even a way to tell
in the program whether a human or a computer is your opponent!!)

However, things being as they are at the moment, I doubt that you can come up with anything better than I did. If you do, let us all know. :-)

Actually, selecting the move for the computer is quite simple: after its made as move, hit the UP key on your keyboard, then hit F7 to see the available moves and click the piece you want to move for your opponent.

I have tried it a bit and already found it teaches me quite well about chess opening lines,
so it IS useful as a teaching tool.

I am looking for ward to see your own books!

Cheers, Karl
Karl Scherer (Karl)
Posted on Sunday, November 13, 2005 - 1:16 pm:   

Forgot to mention:

A text file (called chess.txt) similar to
http://www.rebel.nl/download/eco.zip
is included in the game "Chess With Opening Book".
It is contained in the Includes directory of this game.

And, as stated before, YES, one CAN translate such a text file into a Zillions Opening book of my type with any text-manipulating program.

Can one of the Z-authors please put his/her hand up to tell us which programming language deals with string manipulation?? String manipulation is simple, so there should be lots of tools available for this.
Mats W (Kålroten)
Posted on Monday, November 14, 2005 - 1:11 am:   

Certainly, "opening book" means that you have to 'ignore' the computer's 'intelligence'. That's the whole point. The best programs in the world hardly ever start to think before the tenth move.
Ronald W Brierley (Ronaldwb)
Posted on Tuesday, November 15, 2005 - 11:22 am:   

Snobol is a string manipulation language but currently I have no information of its availability in a Windows environment.
Andreas Kaufmann (Andreas)
Posted on Tuesday, November 15, 2005 - 3:38 pm:   

To convert a text file from one format to another (like needed for opening book) I would recommend Perl language. It is freely available on Windows (see e.g. http://www.activestate.com/Products/ActivePerl/?_x=1).
Karl Scherer (Karl)
Posted on Friday, November 18, 2005 - 6:49 pm:   

V2.2 of "Chess with Opening Books"
(out tomorrow on the Zillions home page, or download it from my web pages now: http://karl.kiwi.gen.nz) now contains
FIVE selection screens, TWO of which I have filled now with opening books (new: 1.e4, B01-B99); three are still empty.

Major redesign:
The code has been radically redesigned according to some excellent suggestions by Alfred Pfeiffer.
The bookmoves now are not associated any more with any standard chess pieces, but with some
temporarily used pieces "book-active", of which Black and White each own one, but only as long as the book is active.
This increased the speed of the computer's replies. In case where there is only one book move, the computer now responds immediately. Before it took about 5 seconds.
Karl Scherer (Karl)
Posted on Monday, November 28, 2005 - 2:05 am:   

Good news regarding game "Chess with opening books":

- every week I am adding more opening books to the
game.

- (out next week:) ) White can now exit the Opening
Book prematurely at any time. Simply click the
yellow "book active" indicator at the left
border.
Since the programmer cannot check whether a
player is a computer,
and since a computer is supposed to
stay in the opening book as long as possible,
I cannot let Black have this option as well.
However, a simple, small change in the
include - file "moves.inc" can make this option
available for Black instead of White.
Karl Scherer (Karl)
Posted on Monday, November 28, 2005 - 2:07 am:   

P.S.
The simple small change mentioned is replacing
"in-zone? pc a8" by "in-zone? pc a1".
Mats W (Kålroten)
Posted on Monday, November 28, 2005 - 10:30 am:   

"White can now exit the Opening
Book prematurely at any time."

This was a very important update. This increases the value of the opening book greatly, because people can now play all the deviant variants.

It would be great if some checkers enthusiast could do the same work for checkers. The checkers program is quite good. Together with an opening book it becomes a quite valuable program. It's the same with Go which has an engine of its own, and Go-moku, too. These are fine programs, and it's said that they can't make the most of the openings. Opening books are a good learning facility, too.
Karl Scherer (Karl)
Posted on Saturday, December 10, 2005 - 4:17 pm:   

Help wanted for "Chess with opening books".

I have now written 40 opening books.
These books comprise about 50 percent of the work
involved in order to incorporate all openings of the included collection (see text file chess.txt)
It would be nice if we could split the outstanding
work amongst several authors.
Is anyone willing to volunteer for opening books containing openings Dxx and Exx while I am completing Cxx?

Please reply via email to karlscherer3@yahoo.co.nz
Thanks, Karl

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: