One ply chess engine

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

Moderators: hgm, Rebel, chrisw

ethanara
Posts: 134
Joined: Mon May 16, 2011 6:58 pm
Location: Denmark

One ply chess engine

Post by ethanara »

Hi,
What about making some engines that only searches one ply (or setting an existing engine to play one ply)?
Then it will only be about evaluation.
Anyon up for making a mini chess engine :P ?
The good things:
Evaluation , this is the most important in oneply
It is much easier to make , you can even use minimax and a 8*8 board without losing to a nega scout magic bitboard
Less contestants, if you are the first to make a good one, you will be number one!!
Time , you can make millions og games a day because itonly searches... One ply
You will get better at the brain of chess programming, evaluation (and search is the heart)
So, anyone?
I will plan making one, and if there come more , i will make a ratinglist
Mini Regards
Ethan
Sven
Posts: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: One ply chess engine

Post by Sven »

Quiescence search allowed or not?
Could become a pointless matter without it ...

Sven
User avatar
mclane
Posts: 18753
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: One ply chess engine

Post by mclane »

the last 1 ply engine i remember was chat by wolfgang delmare who later made check check.

this was somewhere in the 80s.

but there were plenty of very selective chess programs (successors of the very selective chess programs we have NOW), such
as Mark V, Mephisto III S, Cyrus 68000, ...

those chess programs played very interesting chess, if you relate the hardware they used (e.g. 6502 2 mhz or motorola 68000 with 8 mhz) with the thousands of Mhz and MEGAbyte etc. etc. of todays chess programs.

old machines had only 32 KILObyte rom or 8 KB RAM.
todays chess program can access 256 Megabyte RAM ...


Mephisto IIIs chess tree was so small that you could print it out
on a normal piece of paper, the whole tree of 3 minute computing !

CHAT by wolfgang delmare was a dos text engine.
it played very strange kind of chess. i remember a game from the porz-open (a human chess tournament in cologne) where chats and the opponents position was so strange that the human sweat like hell and the position looked more like the players played from the left to the right instead from up to down and vice versa.

delmare had the idea e.g. to forbid his program to move own pawns higher than 4th rank. with this "strategy" he tried to shut the position closed and get at least a draw.
Last edited by mclane on Wed Aug 24, 2011 12:16 am, edited 2 times in total.
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
User avatar
fern
Posts: 8755
Joined: Sun Feb 26, 2006 4:07 pm

Re: One ply chess engine

Post by fern »

I believe there is a contradiction "in re" in your proposal. You cannot anymore evaluate with just one ply than you can evaluate how much big the result is of a column of number just considering the very first. Evaluation involves to take into account and give a judgement, but for that you need to go further than one move or first impression or first number. How could you evaluate the goodness of a move without knowing if in the very next you will be mated?
Perhaps with just one ply you could measure the quality of the engine to order moves from most to less important or relevant. Like a human choosing to take a look at this and that moves, discarding automaticdally many others. But, still, that is not equal to evaluate.
Sorry If i understood you wroingly, if that is the case

Fern.
User avatar
mclane
Posts: 18753
Joined: Thu Mar 09, 2006 6:40 pm
Location: US of Europe, germany
Full name: Thorsten Czub

Re: One ply chess engine

Post by mclane »

i found some more info about chat....

http://www.schaakcomputers.nl/hein_veld ... 204%29.pdf

article by Hans Peter Ketterling, page 22 says:
Chat ist das von der WM 88 in Almeria bekannte Amateurprogramm von Wolfgang Delmare, das in Pascal geschrieben ist, auf einem 32-Bit-Prozessor 68.020 mit 24 MHz lief und Leonardo als elektronisches Schachbrett zur Zugeingabe benutzte. Günter Niggemann ermittelte aus den Turnierergebnissen die folgenden Ingo-Zahlen, die ich zum Vergleich in Elo-Zahlen umgerechnet habe:
Gerät Ergebnis Ingo Elo
Mach III Master 5,5 121 1872
Simultano II 4,5 134 1768
Simultano I 3,5 140 1720
Dominator 4,0 180 1400
Chat 2,5 209 1168
translation:

chat is the amateur-program made by wolfgang delmare, known from the championship 1988 in almeria. it was written in PASCAL and was running on a motorola 68020 with 24 mhz, used a leonardo as input-output device.
a list of elo ratings played in the tournament follows which gives chat an elo of 1168 rating points.
What seems like a fairy tale today may be reality tomorrow.
Here we have a fairy tale of the day after tomorrow....
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: One ply chess engine

Post by Don »

ethanara wrote:Hi,
What about making some engines that only searches one ply (or setting an existing engine to play one ply)?
Then it will only be about evaluation.
Anyon up for making a mini chess engine :P ?
The good things:
Evaluation , this is the most important in oneply
It is much easier to make , you can even use minimax and a 8*8 board without losing to a nega scout magic bitboard
Less contestants, if you are the first to make a good one, you will be number one!!
Time , you can make millions og games a day because itonly searches... One ply
You will get better at the brain of chess programming, evaluation (and search is the heart)
So, anyone?
I will plan making one, and if there come more , i will make a ratinglist
Mini Regards
Ethan
I like your idea but you need to know what you are doing because ...

You would have to have some strict rules to do this well because an evaluation function can be implemented as a search. Or one might spend a lot of cpu cycles resolving tactics using the evaluation function - things like trying to detect mate in 2, non-trivial 2 or 3 ply tacitcs, etc. So you might get an evaluation functions that is less concerned with positional play and more with simple tactics.

As someone has pointed out already there is also the issue of quies search - which should be strictly defined. For a 1 ply searcher I would go with the classical quies search, all captures, not see() no pruning. Move order would be irrelevant since speed is not an issue. You might consider allowing 1 ply of checks in quies.

The evaluation function has to be managed. A simple thing is just to make this a piece square table contest but that is less than satisfying and would limit the already limited strength.

One thing you could do is provide a mini-language for constructing an evaluation function. You could use a forth-like language which can be implemented in just minutes. To avoid problems like I mentioned earlier, a managed language for implementing an evaluation function could have a limit on the number of instructions that can be executed.

Probably not as simple as it sounds, right?
ethanara
Posts: 134
Joined: Mon May 16, 2011 6:58 pm
Location: Denmark

Re: One ply chess engine

Post by ethanara »

Hi Don
Thx for interest.
The actual idea was to see how good a dumb human could be only thinking one move ahead. Since humans can easily recognize captures checks etc. I think ther shall be quie , but at a depth like max. 4
I like your idea of making a language, but what about making the board and "search"
And then the programmer implements eval?
Im about to make a template (or language) for this purpose
I ran sf some time ago, and when i said depth one, it couldnt , but searched depth 5 or so.
Is there any engines now that can search only one ply (but then quie will be a issue)
It is very interesting for me to hear that chat could achieve a relatively high rating with only one ply.
Regards
Ethan
Ps. Is anyone planning to make an engine?
Edit: i know what you mean with search = eval, so i think only detecting forks and pins in its own move will be legal
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: One ply chess engine

Post by Don »

ethanara wrote:Hi Don
Thx for interest.
The actual idea was to see how good a dumb human could be only thinking one move ahead. Since humans can easily recognize captures checks etc. I think ther shall be quie , but at a depth like max. 4
I like your idea of making a language, but what about making the board and "search"
And then the programmer implements eval?
Im about to make a template (or language) for this purpose
I ran sf some time ago, and when i said depth one, it couldnt , but searched depth 5 or so.
Is there any engines now that can search only one ply (but then quie will be a issue)
It is very interesting for me to hear that chat could achieve a relatively high rating with only one ply.
Regards
Ethan
Ps. Is anyone planning to make an engine?
Edit: i know what you mean with search = eval, so i think only detecting forks and pins in its own move will be legal
The details of the search and board are not important, but what might be important is that anyone can reproduce the results - so you basically have a specification for what this thing should do. My suggestion is that the search is a 1 ply "full width" program with unlimited quies search. In quies you consider only captures and on the first ply of quies checks which adds a lot of punch to a 1 ply search. I would also suggest that any first ply checks be extended 1 ply so that after a check out of check sequence we get to do 1 ply of checks in quies again. In quies of course you consider captures and "standing pat with score" as an option which is the standard way to do quies. Move ordering is important for efficiency but it's not important for function or correctness. All promotions are considered captures for purpose of quies.

If 20 people implemented that (and use the same evaluation) I think you would get 20 equivalent programs in strength - assuming my specification is complete.

I have an idea for the evaluation too. The evaluation could be a specification for building a pre-processed piece square table. I did this many years ago for a program which won the International Computer Chess Championship. I was basically a set of C macro's that formed a nice little language for populating a piece square table. You could clear the board, ask where pieces on the board are, assign or increment squares on the board for a particular piece and operate on files and ranks (and I think diagonals) in one operation. There were many useful primitives and it was relatively easy to set up. Symmetry was built into the language so that when you did any operation or test it was applied to both colors simultaneously (if the test applied of course.)

With only a 1 ply search you can even simulate mobility with a pretty good degree of accuracy and you can handle just about anything.

I don't have an exact ELO estimate, but I think really good evaluation combined with a 1 ply search would play around 1100 give or take 100 ELO or so. Leave out the checks in quies and that number goes down a lot. (Checks in quies is not worth as much in a 20 ply search, but in a 1 ply search tactics dominate.) Larry may be able to give you a better estimate.
ethanara
Posts: 134
Joined: Mon May 16, 2011 6:58 pm
Location: Denmark

Re: One ply chess engine

Post by ethanara »

Thx don , based on your and mine ideas i will make a set of rule soon
Regards
Ethan
Ps. Maybe we should make a challenge so i play a match against the best (im at best a 1200 player :( )
Pps. What about making three groups:
Human like (with my very very simple opening book and 3man egtb and quie)
Computer like (quie)
Pure (only on ply)

Then , you could make an engine which can play in all groups or one only playing in one group
User avatar
Don
Posts: 5106
Joined: Tue Apr 29, 2008 4:27 pm

Re: One ply chess engine

Post by Don »

ethanara wrote:Thx don , based on your and mine ideas i will make a set of rule soon
Regards
Ethan
Ps. Maybe we should make a challenge so i play a match against the best (im at best a 1200 player :( )
I would like to mention that my little language had procedures, loops and if statements and I think it was turing complete.