How many teachers were abducted by the Ghost with fewer posts.
Big Henk!! You're my Idol

Moderator: Ras
That depends on how you define 'super simple'. Adding true move sorting (i.e. first store the moves you generate in an array before you start searching any), rather than searching them as soon as the roll out of the move generator, and sorting killers amongst the first should certainly shrink the search tree for the same depth a lot.Henk wrote:Do you think you could write a super simple engine that beats Fairy-Max easily ?
Two ply sounds like a lot, but you should realize that Fairy-Max' plies are a bit exaggerated, because it applies LMR to all non-captures, except the hash move. (There are no killer or good-history moves to exempt.)At this moment Skipper searches two plies less deep than Fairy-Max. For instance it doesn't reduce depth at all when in check.
Fairy-Max still uses the same search and evaluation, this is why the number is still at 4.8. Over time there have been some changes in the move generation, to make it more general (allow castling where the King moves 3 squares, finite-range sliders that move maximally 3, 4 or 5 squares, initial moves on non-pawns, bent sliders, which turn a corner, collider pieces that change direction on the square before an obstacle, instead of at the obstacle as hoppers do). And it supports Seirawan-Chess-style gating to introduce new pieces from the hand, multiple royalty (both absolute and extinction type), and a different promotion type for white and black. And an alternate winning condition for the royal reaching a certain area.Dann Corbit wrote:I guess that Fairy Max has advanced, but Olithink is almost surely the stronger engine.
Visual Studio 2015 Community Edtition does have free PGO, and for profiling you can use VerySleepy. Or go to Linux and use Valgrind.Henk wrote:If it is a bug it won't be a trivial one for all perfts and mate searches seams to go well.
By the way my visual studio express versions have no profilers so it makes it difficult to find computational bottlenecks.
I got a bit carried away by this question. (I know, unwise...) So last week I spent writing a new engine for orthodox Chess, as a response to this challenge (and to relieve the 'after-ICGA blues). I started on Sunday night, got a bit carried away (so that I added lots of not-yet-used code to it that perhaps goes beyond 'super-simple'), and only made a first attempt to compile it on Thursday morning. (Took me all morning to solve all the typos...) Once I could run it I had to cure some 30 bugs, about 5 of which were design flaws. But last Sunday it could finally play a game without 'exiting unexpectedly' or making 'False illegal-move claims'. And in the 3rd full game it played it did score a win against Fairy-Max! I let ran a match last night, and it scored some 50%, with still a fair amount illegal-moves. (Another design flaw: when in check, I try to limit move generation to potential evasions, but I forgot the most important evasion of all, namely capturing the opponent King, so that it could move pinned pieces to deliver check.)Henk wrote:Do you think you could write a super simple engine that beats Fairy-Max easily ?
Cool!Henk wrote:Or call it Fairy-Simple.
Why did you do that? Piece-square tables are almost free. In 'Simple' I store not only positional scores, but also the piece base value in these tables.By the way Skipper has no piece square table anymore. Perhaps that's why elo dropped with 100 points or more last months.
Code: Select all
/**************************************************************************************/
/* Search routine that does about everything in-line. Its structure is: */
/* 1) Probe hash table */
/* 2) Determine if the preceding (non-null) move checked us (if hash did not tell us) */
/* 3) Apply (check-)extension and reductions (passed to us from from parent) */
/* 4) Take hash cutoff if draft allows it */
/* 5) (Lazy) evaluation of position (mobility and King safety guessed from parent) */
/* 6) QS: Stand pat on lazy-eval score if good enough (with margin) */
/* 7) Generate moves; In QS only keep captures. Return +INF instantly on King capture */
/* 8) Search null move, for accepting its fail high or as dummy (see below) */
/* 9) Calculate mobility and King safety (side effect of move gen and null move) */
/* 10) QS: Try to stand pat again on precise evaluation */
/* 11) Validate hash move, and put it in front of move list */
/* 12) Store draw in hash entry for current position, to get rep-draws along branch */
/* 13) Search moves, using IID starting at depth from hash probe (if valid) or d=1 */
/* A) Loop over moves: */
/* a) Move sort: extract best capture, or validate killers (if not yet done) */
/* b) Decode and make move */
/* c) Recursion with self-deepening (fail-highs always will have full depth) */
/* d) In root: we can exit here for a chosen move, leaving it performed */
/* e) Unmake the move */
/* f) Process the returned score (possibly cutting off move- and IID loop) */
/* B) Decide on continuation of self-deepening */
/* C) Stalemate correction on ultimate fail low (i.e. when all moves illegal) */
/* 14) Hash store */
/* 15) Delayed-loss bonus */
/* */
/* KLUDGE: Search can also be used for calculating one-sided mobility, by calling it */
/* with trheshold argument set to INF+10. This suppresses the hash probe, and passing */
/* previousPly = 0 (null move) suppresses the check test, while depth > 0 suppresses */
/* evaluation and stand-pat, so that we directly go into move generation. It then */
/* returns with the mobility that is calculated during it. */
/**************************************************************************************/
int
Search (int startAlpha, int beta, int threshold, int mobilityGuess, int previousPly, int reduction, int depth, int extraDepth)
{
...
}
Giraffe can beat Fairy-Max pretty easilyHenk wrote:Do you think you could write a super simple engine that beats Fairy-Max easily ?
Nodes per second of Fairy-Max is at least five times more than Skipper2.
Skipper uses killer moves and non captures are sorted. Also King safety is more complicated.
At this moment Skipper searches two plies less deep than Fairy-Max. For instance it doesn't reduce depth at all when in check.
Code: Select all
Rank Name Elo + - games score oppo. draws
1 Giraffe 63f71c3eb204 101 60 52 38 75% -101 3%
2 Fairy-Max 4.8S -101 52 60 38 25% 101 3%