bob wrote: Don wrote: bob wrote: Don wrote: jdart wrote:
But there is a drawback. The only book lines you consider are the book lines you choose to include by whatever means.
This is a result of the fact that most book formats (including mine) are based on a fixed size book that is basically a persistent hash table. A real learning book would be able to dynamically add new moves that the program's opponents have played, which would require something closer to a real database interface - in fact I have considered using a SQL db like mySQL for this. Then you are not limited to a fixed move set but can add lines that have been played against you. I don't know why this is not more commonly done, except that it is more complex to implement.
I think a general solution is to to make sure that the computer would play one of those moves on it's own given the time control of the tournament the book is for. If not, the move the computer would play should be added. By doing this there are no blatant holes in the book where the only responses are losing move. Of course as you say you should have to option to add a move that is not in the book but could be critical. Also, if a move is playable you would want to be prepared against it, even if it's not of major interest. Any time your program is surprised by a move not in book it should be added and given proper treatment unless of course it's a blunder.
What about all the current opening moves a computer would not play by itself, but which are the ONLY way to avoid losing a game???
Please note that when I say, "put the move in the book" I don't mean that is what it should play. The context here is figuring out some automatic or semi-automatic way to build a custom book for a given program so you have to start with something that is as comprehensive as possible and then figure out how to narrow down the choices to moves your program will do well with.
If you KNOW there is only 1 move and everything else loses, then of course you would want some mechanism to specify this so that time is not wasted with the computer having to learn that it's bad. On other other hand you probably WANT that move in the book if it's an opponent option, if your program thinks it is good chances are other programs and perhaps humans too will think so. You would want your program to be able to refute it.
You sound like you are describing a simple sequential file update where you add what you played to the end in something like PGN format? Something you could later filter any way you want to create moves to add to a real book?
sort of .... see my next comment
My book learning stuff was written specifically to eliminate that part of the process, and it works to a point. But it can't learn from "surprise moves" until they are actually encountered OTB, which is a problem...
I am thinking about using sqlite for the book because it's dirt simple to manipulate but that is an unimportant detail - it could easily be done with a polyglot-like hash table format.
But the concept is that the book is expandable and contains everything, even moves the program may never play (or may only play in some mode where you allow off-beat and weaker lines of play as a user option.) But by some undefined mechanism - perhaps off-line processing - the computer is constantly inspecting and improving it's opening book choices. This likely would include data from games it has won and lost.
I don't know how masters do it, but I learned the openings I played primarily be losing games. I never made the same mistake twice and when I lost a game (or even got into a difficult game that I did not lose) I figured out where I could have improved.
A funny thing happened when I was weaker too which illustrates a real problem. Sometimes the computer would throw something at me (right out of book) that I could not handle but was technically not a good move. I would work to figure out how to refute it thus improving my results against the computer which I was usually evenly matched with (this was back in the fidelity days.) But for fun I would try these same moves on my friends at the club in speed-chess and would usually get easy wins. I would watch them go through the same process I did of figuring out what was wrong with the move, then I would stop playing it.
But the computer would not have that flexibility. If you set it up to play on icc and maximize it's wins, it may be learning what works under those conditions but not necessarily be improving. I don't know if there is anything to be done about this, but it's a possibility with any kind of learning I can think of that doesn't have the ability to recursively modify itself. But if the opponents don't find a refutation for a long time the machine may take a long time to unlearn some bad habit.
Which reminds me of another anecdote - when I was a kid at school, I watched one kid always play 1. e4 e5 2. Qh5 when he could against all the other kids. He won game after game because almost everyone without thinking at all would play g6 to attack the king as a gut reaction. A couple of kids figured out to defend the pawn with Nc6 or d6 but he would play Bc4 and 90% of the time his opponent didn't see the checkmate threat. I never played 1... e5 but after watching him I went home and analyzed this like crazy, figuring out all the things he might try and what I would do. I came back the next day and played 1 ... e5 just so that I could face the "intimidating" Qh5!
For dramatic effect I pretended like I was going to play g6 but stopped just short of touching the pawn and pretended that I saw the problem at the last possible moment, then played Nc6.
I pretended that I did not know what I was doing.
He continued with his usual Bc4 and I had Qe7 prepared - I don't really know to this day if it's best but it worked for me and it frustrated him because it solves the mate threat. He played Nf3 and I knew that he planned to gang up on f7 again with his knight - I knew his style already. I responded with Nf6 and he played the stupid Qh3 move and I easily won a piece and the game.
This is the first time I had ever analyzed a game or really saw the beauty of chess and got my first inkling that chess was more than just attacking a piece and hoping the opponent didn't see it. Even though I never lost to this kid I learned a lot from him - and I think I went from being much weaker than him to being much stronger than him in a single 24 hour period. It was one of those experiences that you never forget because it makes something click inside you and changes you.
But the real point of this is that book learning could produce books that play like this! By nature it is more interested in what works than in what is actually best!
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.