Stockfish strength level
Moderators: hgm, Dann Corbit, Harvey Williamson
Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Stockfish strength level
Hi!
I found this:
https://github.com/niklasf/stockfish.js
This is used by "lichess".
My question is: what parameter does the "lichess" use to set engine level?
-Tamas
I found this:
https://github.com/niklasf/stockfish.js
This is used by "lichess".
My question is: what parameter does the "lichess" use to set engine level?
-Tamas
-
- Posts: 6052
- Joined: Tue Jun 12, 2012 10:41 am
Re: Stockfish strength level
whatever the level, it is very weak, as one is able to beat it even at level 8.tomitank wrote:Hi!
I found this:
https://github.com/niklasf/stockfish.js
This is used by "lichess".
My question is: what parameter does the "lichess" use to set engine level?
-Tamas
seemingly, for levels 1-6 they are using some randomisation, while levels 7 and 8 only significantly limit the time usage, to fraction of a second.
Re: Stockfish strength level
That's okay.
I'm interested, for example, at level 7, what is the minimum depth and the maximum search time.
I'm interested, for example, at level 7, what is the minimum depth and the maximum search time.
-
- Posts: 6052
- Joined: Tue Jun 12, 2012 10:41 am
Re: Stockfish strength level
that will depend on the computers.tomitank wrote:That's okay.
I'm interested, for example, at level 7, what is the minimum depth and the maximum search time.
as different users will be served by different cpus, depth will vary.
Re: Stockfish strength level
I do not think so.
On weaker devices, it searched longer.
On weaker devices, it searched longer.
Re: Stockfish strength level
From stockfish source code:
Accordingly, is the set level + 1 equal to the maximum search depth?
Code: Select all
#ifdef SKILL
// Skill structure is used to implement strength limit
struct Skill {
Skill(int l) : level(l) {}
bool enabled() const { return level < 20; }
bool time_to_pick(Depth depth) const { return depth / ONE_PLY == 1 + level; }
Move best_move(size_t multiPV) { return best ? best : pick_best(multiPV); }
Move pick_best(size_t multiPV);
int level;
Move best = MOVE_NONE;
};
#endif
Code: Select all
// If skill level is enabled and time is up, pick a sub-optimal best move
#ifdef SKILL
if (skill_.enabled() && skill_.time_to_pick(rootDepth))
skill_.pick_best(multiPV_);
#endif
-
- Posts: 46
- Joined: Mon Dec 12, 2016 1:14 pm
- Contact:
Re: Stockfish strength level
You can find the relevant code for the settings of movetime, depth limit, and skill level here:
https://github.com/niklasf/fishnet/blob ... #L109-L110
https://github.com/niklasf/fishnet/blob ... #L774-L782
https://github.com/niklasf/fishnet/blob ... #L109-L110
https://github.com/niklasf/fishnet/blob ... #L774-L782
Re: Stockfish strength level
Yes, SF level on Lichess is 1 to 8. "1" is the strongest level, I think it search for 2 millions nodes or so.tomitank wrote:From stockfish source code:
Code: Select all
#ifdef SKILL // Skill structure is used to implement strength limit struct Skill { Skill(int l) : level(l) {} bool enabled() const { return level < 20; } bool time_to_pick(Depth depth) const { return depth / ONE_PLY == 1 + level; } Move best_move(size_t multiPV) { return best ? best : pick_best(multiPV); } Move pick_best(size_t multiPV); int level; Move best = MOVE_NONE; }; #endif
Accordingly, is the set level + 1 equal to the maximum search depth?Code: Select all
// If skill level is enabled and time is up, pick a sub-optimal best move #ifdef SKILL if (skill_.enabled() && skill_.time_to_pick(rootDepth)) skill_.pick_best(multiPV_); #endif
Other levels are simply a constant progression to map "1 to 8" to "1 to 20 SF levels".
Re: Stockfish strength level
Is correct?
At Level 8: Max depth = 62, movetime = 370ms / thread (default 3)
At Level 7: Max depth = 37, movetime = 185ms / thread (default 3)
At Level 8: Max depth = 62, movetime = 370ms / thread (default 3)
At Level 7: Max depth = 37, movetime = 185ms / thread (default 3)