First move without opening book - search or hardcode?

Discussion of chess software programming and technical issues.

Moderator: Ras

KhepriChess
Posts: 93
Joined: Sun Aug 08, 2021 9:14 pm
Full name: Kurt Peters

Re: First move without opening book - search or hardcode?

Post by KhepriChess »

clayt wrote: Sun Aug 07, 2022 5:52 pm Regarding your first suggested move being h3: I suspect that your leaf evaluation function isn't fine-grained enough, and so your engine is selecting either the first or last move generated, as the rest of the opening moves have the same leaf evaluation after search. Is your current evaluation function just pure material?

As soon as you add a good PST, this issue should go away.
I guess I should clarify, since I seemed to be unclear in my original comment: my search isn't returning h3 as a "good" first move. I was saying that, in the context of randomly picking a first move, I wouldn't want to randomly have the engine select h3. When the engine does an actual search, the first move is always 1. Nf3.

But thanks everyone. I'm just going to look at adding polyglot support and otherwise let the engine search and pick the best move right from the start.
Puffin: Github
KhepriChess: Github
Chessnut1071
Posts: 313
Joined: Tue Aug 03, 2021 2:41 pm
Full name: Bill Beame

Re: First move without opening book - search or hardcode?

Post by Chessnut1071 »

tcusr wrote: Sat Aug 06, 2022 10:11 pm if the first suggested move is h3 then there's something wrong with evaluation
Remember 1. h4 -Mac Hick- from MIT? It scared Russian Grandmasters for a few weeks when they took it to Moscow. Brezhnev actually demanded Carter destroy the program. That move was after a 6 month supercomputer doing an exhaustive search logging every response. btw, Fischer had an effective response he wrote at the early age of 7. Just goes to show you, even a bad move can look go if you go deep enough.
KhepriChess
Posts: 93
Joined: Sun Aug 08, 2021 9:14 pm
Full name: Kurt Peters

Re: First move without opening book - search or hardcode?

Post by KhepriChess »

Got Polyglot support mostly added, except that something's not right so it's giving me invalid moves (probably a hashing issue, though I have yet to figure out what the problem is).

But...in testing the hashing function I found an unrelated bug. Seems I had forgotten to reset an array (that contained piece info for every occupied square) when a new position was loaded (every UCI position command) that resulted in incorrect position hashes. Once that was fixed, I got around a 100 (+/- 30) Elo boost. So that was a nice surprise.
Puffin: Github
KhepriChess: Github
User avatar
Ajedrecista
Posts: 2101
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: First move without opening book - search or hardcode?

Post by Ajedrecista »

Hello Bill:
Chessnut1071 wrote: Mon Aug 08, 2022 5:12 amRemember 1. h4 -Mac Hick- from MIT? It scared Russian Grandmasters for a few weeks when they took it to Moscow. Brezhnev actually demanded Carter destroy the program. That move was after a 6 month supercomputer doing an exhaustive search logging every response. btw, Fischer had an effective response he wrote at the early age of 7. Just goes to show you, even a bad move can look go if you go deep enough.
I can not find the funny anecdote anywhere. The most similar thing I found is about P-KR4 (descriptive notation), but it is about thinking time (page 14 of the PDF):

https://link.springer.com/content/pdf/b ... 4-6245-6/1
MAC Hack VI was run on a Digital Equipment Corporation PDP-6. Greenblatt estimates that in this application the average speed was 200,000 singleaddress operations per second. The machine needed, on the average, 72 seconds to compute a half-move, i.e., it went through 14 million operations while making up its mind. The actual time, in one tournament game, varied between 111.7 seconds, while deciding to move P-KR4, and 4.5 seconds, while deciding to recapture after losing a Rook.
The figure of 111.7 seconds (12.- h4) can be found at page 809 of The Greenblatt chess program paper from 1967:

https://dl.acm.org/doi/pdf/10.1145/1465611.1465715

Can you point me to reliable sources on the anecdote, please? Thank you in advance.

Regards from Spain.

Ajedrecista.