You are NOT creating a new "list of legal moves" object for each generation, I hope??? Nor are you creating a new chess board for each move made?Ralf Müller wrote:The language is C++
I don't use Piece-Lists, my board representation is square-centric.
So far I see, only legal moves are generated.
How many plys without pruning?
Moderators: hgm, Dann Corbit, Harvey Williamson
-
bob
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: How many plys without pruning?
-
Ralf Müller
- Posts: 127
- Joined: Sat Dec 29, 2012 12:07 am
Re: How many plys without pruning?
Hi Mr Hyatt, many thanks for your answer.
The first is true, the second not, though I just restore the board by copying and put the legal moves in an existing array, no memory association
I know, this program is highly inefficient - we're building a new one, following these steps.
Do you think, it's a good basic?
The first is true, the second not, though I just restore the board by copying and put the legal moves in an existing array, no memory association
I know, this program is highly inefficient - we're building a new one, following these steps.
Do you think, it's a good basic?
-
Don
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: How many plys without pruning?
Hi Ralf,Ralf Müller wrote:Hi Mr Hyatt, many thanks for your answer.
The first is true, the second not, though I just restore the board by copying and put the legal moves in an existing array, no memory association
I know, this program is highly inefficient - we're building a new one, following these steps.
Do you think, it's a good basic?
Some suggestions. If you restart your project from scratch you might consider using an 8x16 board representation, I think it's a bit easier to work with then 10x12 - probably not a big deal but you very quickly detect illegal squares with 8x16 - see the chessprogramming wiki for the reasons if you don't already know.
Move generation is a big deal for performance. You should generate moves in stages - make a function to detect whether a move is legal and use it to try the hash table move first to completely avoid having to generate any moves. Don't trust the move in the hash table for this and you will need the routine for killers too.
Then generate JUST the captures and try them next in MVVLVA order. If you still do not have a cutoff, try the 2 killer moves if they are legal. Then finally generate the rest of the moves. You will probably get a doubling of nodes per second by doing it this way. You should also have a special out of check generator and Komodo has a generator that generators only quiet checking moves for the "checks in quies" nodes. Each of these things is a noticeable improvement in performance.
You also need a reliable "static exchange evaluator", make sure it's fully debugged. This is a major performance boost. Once you have that, your quies search should throw out any moves that are "losing" except of course when getting out of check. In the main search you should delay losing captures until at least after the 2 killers have been played. It's a big deal.
By the way, without quies Komodo is SLOWER. You need quies to make the search reasonably stable and fast.
If you do those things your program will still be about 30 years out of date but due to hardware advances it should outplay just about any program of 30 years ago on the hardware they were running on.
Probably next on the list of "must have" things is futility pruning and null move pruning. Null move pruning is probably the biggest advance ever in computer chess (after alpha/beta pruning) and with modern hardware it's even more that it was 20-30 years ago. It's the gift that keeps on giving.
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.
-
valdiorn
Re: How many plys without pruning?
Ok, I understand what you mean.Sven Schüle wrote: Alpha-beta pruning is only one of several forms of pruning:
- Nullmove pruning
- Futility pruning
- Late move pruning
- ...
I always thought of null move "pruning" and late move "pruning" as just reduction searches. You do a reduced search, then compare the score to alpha and beta and then you "prune" depending on those values.
So the only actual pruning you do is by comparing the score from those searches to alpha and beta, thus, it's all alpha-beta pruning in the end
-
Don
- Posts: 5106
- Joined: Tue Apr 29, 2008 4:27 pm
Re: How many plys without pruning?
So what you want is a stragighforward alpha/beta search without pruning or reductions of any kind?valdiorn wrote:Ok, I understand what you mean.Sven Schüle wrote: Alpha-beta pruning is only one of several forms of pruning:
- Nullmove pruning
- Futility pruning
- Late move pruning
- ...
I always thought of null move "pruning" and late move "pruning" as just reduction searches. You do a reduced search, then compare the score to alpha and beta and then you "prune" depending on those values.
So the only actual pruning you do is by comparing the score from those searches to alpha and beta, thus, it's all alpha-beta pruning in the end
Don
Capital punishment would be more effective as a preventive measure if it were administered prior to the crime.