New Search Method(s)

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

New Search Method(s)

Post by jhaglund »

It's time to head in another direction for search methods. Alpha/Beta has been milked dry. The human mind is the most powerful "computer"... why not try to be like it with computer chess?

When asked how many moves ahead Kasparov can think, he replied that it depended on the positions of the pieces. "Normally, I would calculate three to five moves," he said. "You don't need more.... But I can go much deeper if it is required." For example, in a position involving forced moves, it's possible to look ahead as many as 12 or 14 moves, he noted.

The normal GM searches a few moves per second, while a chess engine searches millions per second. See the difference?

Search()->

30+ conditions for root.

Conditions:

What type of move are you?

1) Developing (including castling)
2) Exchange
3) Sacrafice
4) Fork
5) Pin
6) Discovery (check, attack)
7) Skewer
8) Tempo
9) Mate (Threat)
10) Draw (Repeat)
11) Mobility
12) Positional
13) Attacking
14) Defensive/Protective
15) Capture
16) Open rank
17) Open file
18) Open diagonal
19) Castled or Not Castled or Capable of Castling
20) Castling stopping
21) Controling squares
22) Attacking squares
23) Free squares
24) Occupied squares
25) King Safety
26) Safe/Retreat squares
27) Supporting
28) Attack Supporting
29) Capture Supporting
30) Pin Supporting
31) Center Control
32) Other

Order your root move based on the total count of conditions met, bonus, penalty, etc.

To be more successful at Chess, an engine or individual should take these conditions into consideration for a move. Planning is a key to winning. Design & develop a search for just the 3 basic attacks would be a good place to start (forks, pins, & skewers). This will lead to the removal of piece table scores, and if done correctly, alpha/beta. Also, more human-like play will occur.

This would be a step forward for chess.

:)
AlvaroBegue
Posts: 931
Joined: Tue Mar 09, 2010 3:46 pm
Location: New York
Full name: Álvaro Begué (RuyDos)

Re: New Search Method(s)

Post by AlvaroBegue »

I understand why this type of proposal would seem appealing in the 80s, when many people feared alpha-beta would never be enough to reach grandmaster-level play, and lack of planning seemed like a major flaw in how computers played chess.

Imitating the way humans think about the game was tried, and nobody got it to work even better than the alpha-beta searchers of the time. Now that alpha-beta searchers have been enormously successful in chess, you are going to have to put together a promising prototype before I will take your idea seriously.
rbarreira
Posts: 900
Joined: Tue Apr 27, 2010 3:48 pm

Re: New Search Method(s)

Post by rbarreira »

The grandmasters surely have a lot of patterns stored in their minds telling them what a good position is, and what to pay attention to depending on the dispersion of pieces in the chess board. Probably much more that we ignore too.

I don't think you can make a "human-like" searcher without figuring out how to use pattern recognition to do something similar. Also, be prepared to work a long time to come anywhere near the elo performance of alpha-beta methods, which have been tuned for chess for several decades now.
Nettogrof

Re: New Search Method(s)

Post by Nettogrof »

I think that his goal isn't a good elo performance. If we all do/ try alpha-beta method, since it's the best for now, maybe we miss something else.

I like to learn / study new ways/ideas to program.
Engin
Posts: 918
Joined: Mon Jan 05, 2009 7:40 pm
Location: Germany
Full name: Engin Üstün

Re: New Search Method(s)

Post by Engin »

this idea is very old, everybody want this, even i want to do this like human think in ches, it try many people and fails, Botvinnik trys and then give it up, i tried this too but its so diffucult to implement what some selective moves are good to analyse and what are bad and not to do any analyse.

now at the time of high depth with even some selectivity search its not need for extra selectivity of a programm.

but hopefully that will do anytime anybody an algorithm that are near the human thinking in chess. of course this method will much better then today chess engines and because computers are very fast that will be beat everyone in the world, maybe solve complete hole the normal chess, chess960 will be harder because its 960x time more positions.
Aleks Peshkov
Posts: 892
Joined: Sun Nov 19, 2006 9:16 pm
Location: Russia

Re: New Search Method(s)

Post by Aleks Peshkov »

jhaglund wrote:To be more successful at Chess, an engine or individual should take these conditions into consideration for a move. Planning is a key to winning. Design & develop a search for just the 3 basic attacks would be a good place to start (forks, pins, & skewers). This will lead to the removal of piece table scores, and if done correctly, alpha/beta. Also, more human-like play will occur.

This would be a step forward for chess.
I suspect you are a chess player but not a programmer. Have you ever tried to sketch your ideas in code?
User avatar
marcelk
Posts: 348
Joined: Sat Feb 27, 2010 12:21 am

Re: New Search Method(s)

Post by marcelk »

Aleks Peshkov wrote:
jhaglund wrote: To be more successful at Chess, an engine or individual should [...]

This would be a step forward for chess.
I suspect you are a chess player but not a programmer. Have you ever tried to sketch your ideas in code?
Engine wise, he designed "Squash" which gave him an honorary mention on the TSCP site http://www.tckerrigan.com/Chess/TSCP.

All of his posted ideas are of the form that "somebody should try it".

Go figure.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: New Search Method(s)

Post by bob »

jhaglund wrote:It's time to head in another direction for search methods. Alpha/Beta has been milked dry. The human mind is the most powerful "computer"... why not try to be like it with computer chess?
Easy question to answer: Because we don't have a clue about _how_ the human mind makes chess decisions. This has been repeatedly studied, best known example was De Groot's "Thought and choice in chess" book. Until we know how a human chooses a move, emulating that process is going to be a bit on the difficult side. It appears to me that alpha/beta is doing just fine, however, since humans can not keep up.



When asked how many moves ahead Kasparov can think, he replied that it depended on the positions of the pieces. "Normally, I would calculate three to five moves," he said. "You don't need more.... But I can go much deeper if it is required." For example, in a position involving forced moves, it's possible to look ahead as many as 12 or 14 moves, he noted.

The normal GM searches a few moves per second, while a chess engine searches millions per second. See the difference?

Search()->

30+ conditions for root.

Conditions:

What type of move are you?

1) Developing (including castling)
2) Exchange
3) Sacrafice
4) Fork
5) Pin
6) Discovery (check, attack)
7) Skewer
8) Tempo
9) Mate (Threat)
10) Draw (Repeat)
11) Mobility
12) Positional
13) Attacking
14) Defensive/Protective
15) Capture
16) Open rank
17) Open file
18) Open diagonal
19) Castled or Not Castled or Capable of Castling
20) Castling stopping
21) Controling squares
22) Attacking squares
23) Free squares
24) Occupied squares
25) King Safety
26) Safe/Retreat squares
27) Supporting
28) Attack Supporting
29) Capture Supporting
30) Pin Supporting
31) Center Control
32) Other

Order your root move based on the total count of conditions met, bonus, penalty, etc.

To be more successful at Chess, an engine or individual should take these conditions into consideration for a move. Planning is a key to winning. Design & develop a search for just the 3 basic attacks would be a good place to start (forks, pins, & skewers). This will lead to the removal of piece table scores, and if done correctly, alpha/beta. Also, more human-like play will occur.

This would be a step forward for chess.

:)
jhaglund
Posts: 173
Joined: Sun May 11, 2008 7:43 am

Re: New Search Method(s)

Post by jhaglund »

Easy question to answer: Because we don't have a clue about _how_ the human mind makes chess decisions. This has been repeatedly studied, best known example was De Groot's "Thought and choice in chess" book. Until we know how a human chooses a move, emulating that process is going to be a bit on the difficult side. It appears to me that alpha/beta is doing just fine, however, since humans can not keep up.

As a chess player, those are somethings I look for (e.g.).

Go to a chess board right now.

Look at the starting setup....

What is your plan?
----------------------------------------------------------------
Opening:

How shall I start my conquest?
What square / piece / move am I describing?

I am playing white.
I like to take center control with pawns early.
I like to develop my queen side first 60% of the time.
I do not like to move my a || b || f || g || h pawns early.
I lost my last game against this opponent playing white & with a variation of the English Opening, try something new.
I don't like the King Pawn Openings very well unless I am playing black.

----------------------------------------------------------------
Middle game:

Are any of my pieces being attacked?
Can I move away, block, or capture an attacker?
Am I able to defend or support an attack(er)?
Am I able to chase away an opposing piece?
Do I want to exchange pieces?
Should I sacrifice 1 rook for a bishop && knight?
Can I pin, skewer, or fork my opponent?
Are any of my pieces pinned, skewered, forked?
Is there discovery check or attack?
Can I make a discovery attack?
Do I have any weak pieces?
Can I improve my weak piece?
Did my opponent castle?
Can my opponent castle?
Can I stop my opponent from castling?
How safe is my king?
What side is the opponent's king on?
Why am I making this move?
Can my opponent exploit this move?
What do you think the opponent will respond with?
-----------------------------------------------------------------
End game:

Is my king safe?
Do I have any advanced pawns
Can I promote?
What should I promote too?
Can my opponent stop promotion?
Is there a Zugzwang?
Can I draw?
Can I checkmate?
----------------------------------------------------------------
Develop functions to answer/know what all these questions/ statements are.
----------------------------------------------------------------

Or just settle with Alpha-Beta??!

Indeed, A. De Groot was famous for some thesis/ studies.

The 4 Phases of chess amateurs to masters:

1) Orientation: assessing the situation, and determine a very general idea of what to next.
2) Exploration: looking at some branches of the game tree.
3) Investigation: choose a probable best move.
4) Proof: confirming the results of the investigation were valid.

"De Groot found that much of what is important in choosing a move occurs during the first few seconds of exposure to a new position. (Wiki)"

If everyone stuck with DOS, where would Windows 7 or Linux be?
Michael Sherwin
Posts: 3196
Joined: Fri May 26, 2006 3:00 am
Location: WY, USA
Full name: Michael Sherwin

Re: New Search Method(s)

Post by Michael Sherwin »

You are being way to complicated. Computers do not need to take into consideration all the human rationalized/verbalized components that go into finding a move for us humans. If you want to push computer chess to the next higher level then you only need to figure out two main ideas and how to code them.

Making progress is the first idea. An example of this could be; include any two moves to the move list that when played consecutively (null move inserted) leads to a better eval. Then add any three consecutive moves of which none are already in the list that lead to a better eval. Then maybe even do four or five. The idea is, if a move cannot contribute to a better eval even when combined with other moves then it need not be considered. Do a shallow normal search for the baseline.

Alternatives is the second idea. If at a ply white is considered to have enough alternatives determined by a shallow search that are good then narrow the a/b window to reflect that 'fact'. Do the same for black. When the window is narrow enough--shorten the search.

Just some thoughts!
jhaglund wrote:It's time to head in another direction for search methods. Alpha/Beta has been milked dry. The human mind is the most powerful "computer"... why not try to be like it with computer chess?

When asked how many moves ahead Kasparov can think, he replied that it depended on the positions of the pieces. "Normally, I would calculate three to five moves," he said. "You don't need more.... But I can go much deeper if it is required." For example, in a position involving forced moves, it's possible to look ahead as many as 12 or 14 moves, he noted.

The normal GM searches a few moves per second, while a chess engine searches millions per second. See the difference?

Search()->

30+ conditions for root.

Conditions:

What type of move are you?

1) Developing (including castling)
2) Exchange
3) Sacrafice
4) Fork
5) Pin
6) Discovery (check, attack)
7) Skewer
8) Tempo
9) Mate (Threat)
10) Draw (Repeat)
11) Mobility
12) Positional
13) Attacking
14) Defensive/Protective
15) Capture
16) Open rank
17) Open file
18) Open diagonal
19) Castled or Not Castled or Capable of Castling
20) Castling stopping
21) Controling squares
22) Attacking squares
23) Free squares
24) Occupied squares
25) King Safety
26) Safe/Retreat squares
27) Supporting
28) Attack Supporting
29) Capture Supporting
30) Pin Supporting
31) Center Control
32) Other

Order your root move based on the total count of conditions met, bonus, penalty, etc.

To be more successful at Chess, an engine or individual should take these conditions into consideration for a move. Planning is a key to winning. Design & develop a search for just the 3 basic attacks would be a good place to start (forks, pins, & skewers). This will lead to the removal of piece table scores, and if done correctly, alpha/beta. Also, more human-like play will occur.

This would be a step forward for chess.

:)
If you are on a sidewalk and the covid goes beep beep
Just step aside or you might have a bit of heat
Covid covid runs through the town all day
Can the people ever change their ways
Sherwin the covid's after you
Sherwin if it catches you you're through