learning

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Ovyron
Posts: 4556
Joined: Tue Jul 03, 2007 4:30 am

Re: learning

Post by Ovyron »

Mike S. wrote:1. At position X, the (presumably!) best move gets a specific evaluation, and is done (moved).

2. The opponent replies.

3. At position X+2 plies, the eval sudddenly is much worse!

4. The engine will save that position, and the now much different eval, and the search depth this is based on, to the learning file. In future games - as long as the search depth is not bigger - it will use the eval from the learning file, for this position.
Rybka 3 is going to have this kind of learning (and it will save the score of all positions played).
Your beliefs create your reality, so be careful what you wish for.
User avatar
Denis P. Mendoza
Posts: 415
Joined: Fri Dec 15, 2006 9:46 pm
Location: Philippines

Re: learning

Post by Denis P. Mendoza »

shiv wrote:Glad that morph was mentioned. It IS a chess playing engine. Though not a very strong one. I worked a little on the morph source code in the past.

It is based on neural networks. Each square was seen as a node of the network. Of course, there were other elements to it.

One of the problems was that the professor in charge did not want to add piece material values because he felt this was cheating. He instead wanted these to be derived.

In practice this meant that the program had a rating of 1400-1600 instead of 2000-2200+.

Sadly, not much work was done on improving the program as the professor did not have funding for work on this program! It still plays on ICC. I will see if a version of the engine can be available for public download. It does perform learning (not by position, but also its evaluation).

In terms of other programs which adaptively tune their evaluation function, KnightCap comes to mind.
I'hope somebody has worked on Morph (Morph III or better I suppose) as a WB engine so that we could test it ourselves. I only saw codes and not even Windows binaries. From what you said, the author's main intention was to make it learn on his own, gathering data through games played. In real-life chess engines, I may appear that using strong opening books and an enormous endgame tablebase as "some form of cheating", but rather an added weapon for such type of gladiator.

I forgot to mention Knightcap too. Thanks for mentioning Shiv. It was the 9th Australian NCC-CH 2006 champion by Andrew Tridgell. At present, I haven't had luck compiling this one. Only Dann Corbit and Jim Ablett published their builds in the past. The latest version Knightcap 3.7 has book and evaluation learning enabled, Jim about a possible new build for 64 bit or a better 32-bit compile - I hope so. It still uses cygwin from my last account.
shiv
Posts: 351
Joined: Sat Apr 01, 2006 2:03 am

Re: learning

Post by shiv »

Denis P. Mendoza wrote:
I'hope somebody has worked on Morph (Morph III or better I suppose) as a WB engine so that we could test it ourselves. I only saw codes and not even Windows binaries. From what you said, the author's main intention was to make it learn on his own, gathering data through games played. In real-life chess engines, I may appear that using strong opening books and an enormous endgame tablebase as "some form of cheating", but rather an added weapon for such type of gladiator.

I forgot to mention Knightcap too. Thanks for mentioning Shiv. It was the 9th Australian NCC-CH 2006 champion by Andrew Tridgell. At present, I haven't had luck compiling this one. Only Dann Corbit and Jim Ablett published their builds in the past. The latest version Knightcap 3.7 has book and evaluation learning enabled, Jim about a possible new build for 64 bit or a better 32-bit compile - I hope so. It still uses cygwin from my last account.
Morph did support winboard even when I worked on it. Right, for morph, the idea is to learn everything and not allow humans to provide opening books or tune the evaluations. Morph is built on linux and works fine there. The license is a university one, so I will check and see if it can be distributed as a linux binary to tthe world.

Knightcap works fine for me on linux. I had to uncomment something about 3D in the makefile or the source code (long time ago, do not remember much) to make it work. If it works fine on Linux, I assume cygwin should not be that hard to support.
Dann Corbit
Posts: 12541
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: learning

Post by Dann Corbit »

smirobth wrote:
jim wrote:Are there any chess programs that learn---that get better as they play. Is it possible to make a program that learns from its mistakes? :?:
best, Jim
Several people have already pointed out that there are programs that "learn". However I think it is important to point out that when a program "learns" it is very different from how a human learns; programs only learn about a specific position and not general concepts. Programs just don't learn the same way people learn.
That is not entirely true. There are programs that use learning called td-lambda or td-leaf that modify their evaluation functions based on the outcome of game play. KnightCap is one such program:
http://en.wikipedia.org/wiki/KnightCap
[quote

For example a program might learn to avoid a particular move that it has had bad results with in a specific opening position. Or when analyzing a position with a very deep search it may store that analysis and pull it up later when the exact same position arises. What programs never do when they "learn" is to incorporate new concepts. For example if a program doesn't know that a rook pawn and wrong colored bishop ending is frequently drawn, or that it can often be a bad idea to push passed pawns when their rook is in front of the pawn, no amount of "learning" from mistakes will teach the program these concepts. Thus while a program might "learn" not to trade down into a rook pawn and bishop ending in one specific position, and avoid doing so, in a very slightly different position the program will make that mistake.[/quote]
User avatar
Dr.Wael Deeb
Posts: 9773
Joined: Wed Mar 08, 2006 8:44 pm
Location: Amman,Jordan

Re: learning

Post by Dr.Wael Deeb »

Dann Corbit wrote:
smirobth wrote:
jim wrote:Are there any chess programs that learn---that get better as they play. Is it possible to make a program that learns from its mistakes? :?:
best, Jim
Several people have already pointed out that there are programs that "learn". However I think it is important to point out that when a program "learns" it is very different from how a human learns; programs only learn about a specific position and not general concepts. Programs just don't learn the same way people learn.
That is not entirely true. There are programs that use learning called td-lambda or td-leaf that modify their evaluation functions based on the outcome of game play. KnightCap is one such program:
http://en.wikipedia.org/wiki/KnightCap
[quote

For example a program might learn to avoid a particular move that it has had bad results with in a specific opening position. Or when analyzing a position with a very deep search it may store that analysis and pull it up later when the exact same position arises. What programs never do when they "learn" is to incorporate new concepts. For example if a program doesn't know that a rook pawn and wrong colored bishop ending is frequently drawn, or that it can often be a bad idea to push passed pawns when their rook is in front of the pawn, no amount of "learning" from mistakes will teach the program these concepts. Thus while a program might "learn" not to trade down into a rook pawn and bishop ending in one specific position, and avoid doing so, in a very slightly different position the program will make that mistake.
[/quote]

EXChess also uses this unique learning method....
_No one can hit as hard as life.But it ain’t about how hard you can hit.It’s about how hard you can get hit and keep moving forward.How much you can take and keep moving forward….