The following link
http://mysite.verizon.net/vzesz4a6/current/id80.html
takes you to an article I wrote on a new idea for doing the evaluation function for a chess program.
Some of you have seen this before. Any comments, good or bad, are welcome.
Article on proposed heuristic for computer chess program
Moderator: Ras
-
- Posts: 922
- Joined: Sun Nov 19, 2006 9:16 pm
- Location: Russia
- Full name: Aleks Peshkov
Re: Article on proposed heuristic for computer chess program
Influence of nearest 1-ply, 2-ply, 3-ply "mobilities" are dramatically different, so sum of them have very little meaning. So I think your "deep" mobility number is not any better then a simple 1-ply mobility lookup, and may be even worse because it is too optimistic.
IMHO positional pressure is not the same as single side mobility at all. Pressure is a fight for a few selected positionally valuable squares.
IMHO positional pressure is not the same as single side mobility at all. Pressure is a fight for a few selected positionally valuable squares.
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: Article on proposed heuristic for computer chess program
In RomiChess it has always been a sum of the first ply mobility * a constant + the sum of second ply mobility + the number of attacked enemy pieces * a constant. The constants are different for each piece.RVisitor wrote:The following link
http://mysite.verizon.net/vzesz4a6/current/id80.html
takes you to an article I wrote on a new idea for doing the evaluation function for a chess program.
Some of you have seen this before. Any comments, good or bad, are welcome.
However, instead of multiplying by a constant I am going to try creating look-up tables instead. Also I plan on taking into consideration the quality of the attacks as well.
I like the idea of Aleks of figuring in a pressure bonus for a piece on a square and I wonder what should be considered in such a bonus. For instance, how does one go about figuring out which squares even deserve a pressure bonus? I precompute the piece-square tables at the root before each iteration ( I use history table data to tune the piece-square tables after each iteration), so I have lots of time for some rather complicated algorithms.
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
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
-
- Posts: 922
- Joined: Sun Nov 19, 2006 9:16 pm
- Location: Russia
- Full name: Aleks Peshkov
Re: Article on proposed heuristic for computer chess program
Some important squares are well-known: weakness in pawn formations, opened files, light/dark squares, knight outposts can be precomputed in piece-square tables.
Another important square type is local SEE complexity: the more attackers and defenders, the more valuable became the control of that square. Pinning and tying attackers and defenders should also be counted.
Static and dynamic square bonuses can be added. I think pieces of different type and different sides can share that discovered board bonus values. Not only SEE control can be awarded but any "useful" piece attack.
Another important square type is local SEE complexity: the more attackers and defenders, the more valuable became the control of that square. Pinning and tying attackers and defenders should also be counted.
Static and dynamic square bonuses can be added. I think pieces of different type and different sides can share that discovered board bonus values. Not only SEE control can be awarded but any "useful" piece attack.
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: Article on proposed heuristic for computer chess program
SEE complexity pressure can easily be measured, so adding a bonus to a square for say a bishop that the bishop can land on that increases that pressure even if it does not tip the scales of the SEE to the side with the bishop can still be counted as pressure. And bonusing squares that lead to a hole in the pawn formation that a piece can occupy can also be counted as pressure.
The generality that I see in this is to encourage the pieces to move in the direction of a weakness, even if they can not really get there during the search. Is this what you mean by increasing the pressure?
Sounds easy to achieve as I already have a set bit for every piece to every 1st and 2nd ply square that a piece can land on!
The generality that I see in this is to encourage the pieces to move in the direction of a weakness, even if they can not really get there during the search. Is this what you mean by increasing the pressure?
Sounds easy to achieve as I already have a set bit for every piece to every 1st and 2nd ply square that a piece can land on!
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
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
-
- Posts: 922
- Joined: Sun Nov 19, 2006 9:16 pm
- Location: Russia
- Full name: Aleks Peshkov
Re: Article on proposed heuristic for computer chess program
Well, term "pressure" I have taken from the topic article just to point that it is not equal to mobility.
I think it is good to bonus any single attacking/defending for any known weak spot, even if the immediate move here is tactically losing. I think it is useful to bonus any general progress in tactical complexity, for example knight attacking bishop and vice versa assuming that this can be a start of future trade combination.
Computer can have no understanding about opponent's (human) long-term plans, but should counter-play any concrete steps toward that unknown plan. I do not ever think about looking more then 1 ply deep from "quiet" position, but moving toward known weak spot can be a candidate for search extension.
Right know I discovered that this idea is generalization of chess opening development principle: develop pieces in hope that it can be used later.
I think it is good to bonus any single attacking/defending for any known weak spot, even if the immediate move here is tactically losing. I think it is useful to bonus any general progress in tactical complexity, for example knight attacking bishop and vice versa assuming that this can be a start of future trade combination.
Computer can have no understanding about opponent's (human) long-term plans, but should counter-play any concrete steps toward that unknown plan. I do not ever think about looking more then 1 ply deep from "quiet" position, but moving toward known weak spot can be a candidate for search extension.
Right know I discovered that this idea is generalization of chess opening development principle: develop pieces in hope that it can be used later.
-
- Posts: 442
- Joined: Wed Mar 08, 2006 8:54 pm
Re: Article on proposed heuristic for computer chess program
I experimented using the history table to compute piece*square bonuses. Like you I updated the information per iteration. I found a piece*square history the most efficacious. Other things I thought of and experimented with where a decay function to keep a smoother contribution between iterations and adding a bit of the value from pieces with supersets and subsets of movement capabilities.
MvH Dan Andersson
MvH Dan Andersson
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: Article on proposed heuristic for computer chess program
And how did it fare? And what was your range of bonus?Dan Andersson wrote:I experimented using the history table to compute piece*square bonuses. Like you I updated the information per iteration. I found a piece*square history the most efficacious. Other things I thought of and experimented with where a decay function to keep a smoother contribution between iterations and adding a bit of the value from pieces with supersets and subsets of movement capabilities.
MvH Dan Andersson
I have it working quite well now, it seems, but there is much room for improvement! The Elo gain is not huge, only about +40 at most, however it has had a good positive effect on playing style IMO as well.
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
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
-
- Posts: 3196
- Joined: Fri May 26, 2006 3:00 am
- Location: WY, USA
- Full name: Michael Sherwin
Re: Article on proposed heuristic for computer chess program
Thank you for the reply. I will give what you have written, some thought!Aleks Peshkov wrote:Well, term "pressure" I have taken from the topic article just to point that it is not equal to mobility.
I think it is good to bonus any single attacking/defending for any known weak spot, even if the immediate move here is tactically losing. I think it is useful to bonus any general progress in tactical complexity, for example knight attacking bishop and vice versa assuming that this can be a start of future trade combination.
Computer can have no understanding about opponent's (human) long-term plans, but should counter-play any concrete steps toward that unknown plan. I do not ever think about looking more then 1 ply deep from "quiet" position, but moving toward known weak spot can be a candidate for search extension.
Right know I discovered that this idea is generalization of chess opening development principle: develop pieces in hope that it can be used later.
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
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
-
- Posts: 442
- Joined: Wed Mar 08, 2006 8:54 pm
Re: Article on proposed heuristic for computer chess program
The base program was pretty basic stuff built mainly for speed. The modified program was a whole lot smarter and go about 65% of the points. The bonus range was set by a sigmoid function that I adjusted by hand so that the program didn't sacrifice pieces too often.
And the playing style was much more attractive.
MvH Dan Andersson
And the playing style was much more attractive.
MvH Dan Andersson