http://www.mediafire.com/?rvs5lli0cx523br
Stockfish LS v1
---------------
This is a hacked version of StockFish 2.1.1. The only difference is the implemented UCI_LimitStrength feature and changes of the default values. It is possible to adjust the playing strength between 1000 and 2800 ELO.
In the range between 1950 and 2800 ELO the strength is limited with a reduction of the nodes/seconds. That means StockFish LS shouldn't do stupid blunders. This range is quite good tuned and the ELO values are compareable to the SSDF ELO. In the range between 1000 and 1949 ELO StockFish LS uses beside a reduction of the nps the internal SkillLevels. That means StockFish plays positional weaker moves, and on low levels it can also do blunders. This range is not much tuned and I would be happy about feedback.
I turned down the default value for agressivity and erased the value for cowardice. I am satisfied with the style because StockFish plays quite balanced, more fitting to the weakened strength. But you can also switch to the old values of 100.
The limited StockFish LS will play at the same strength on different machines as long as it can reach the nps limit.
If you look at the sources please note that I am not a professional programmer.
My compile is 3 times slower than the original StockFish. That doesn't matter for the weak levels but maybe an expert want to try his luck.
Alex
StockFish LS with LimitStrength feature
Moderators: hgm, Rebel, chrisw
-
- Posts: 1203
- Joined: Thu May 10, 2007 2:49 pm
-
- Posts: 918
- Joined: Mon Jan 05, 2009 7:40 pm
- Location: Germany
- Full name: Engin Üstün
Re: StockFish LS with LimitStrength feature
Hi Alexander,
the UCI_LimitStrength is not new, this comes first from Shredder, and i am tried that with Tornado too in the past, but the adjustements of real ELO strength depends on human players is very difficult, i done that also with limit the nodes to search, but how can you know what nodes/sec to search for an ELO about 1800 ?
The base Idea is good, but prepare of near real strength for human players is very hard to find, because if later the engine is changed, you dont know how much the ELO are being changed too.
So it is much easier to make some handfull playing levels for novice players they can try to play, and if they won they can try high levels.
estimation strength with ELO is not a good Idea in my opinion.
the UCI_LimitStrength is not new, this comes first from Shredder, and i am tried that with Tornado too in the past, but the adjustements of real ELO strength depends on human players is very difficult, i done that also with limit the nodes to search, but how can you know what nodes/sec to search for an ELO about 1800 ?
The base Idea is good, but prepare of near real strength for human players is very hard to find, because if later the engine is changed, you dont know how much the ELO are being changed too.
So it is much easier to make some handfull playing levels for novice players they can try to play, and if they won they can try high levels.
estimation strength with ELO is not a good Idea in my opinion.
-
- Posts: 1203
- Joined: Thu May 10, 2007 2:49 pm
Re: StockFish LS with LimitStrength feature
Hi Engin,
I prefer a concrete value when I use easy levels. I don't have to tune the values after a new release because this will be the one and only version by me
BTW: There seems to be a problem with ponder on and long timecontrols. I'll try to fix that. Better use the Fruit Hack for now...
http://www.mediafire.com/?5dc5pn0cqkuoepf
Alex
I prefer a concrete value when I use easy levels. I don't have to tune the values after a new release because this will be the one and only version by me
BTW: There seems to be a problem with ponder on and long timecontrols. I'll try to fix that. Better use the Fruit Hack for now...
http://www.mediafire.com/?5dc5pn0cqkuoepf
Alex
-
- Posts: 1203
- Joined: Thu May 10, 2007 2:49 pm
Bugfix
StockFish LS v2 is available: http://www.mediafire.com/?eh8hjqq1hj1tt53Alexander Schmidt wrote:Stockfish LS v1
---------------
This is a hacked version of StockFish 2.1.1. The only difference is the implemented UCI_LimitStrength feature and changes of the default values. It is possible to adjust the playing strength between 1000 and 2800 ELO.
In the range between 1950 and 2800 ELO the strength is limited with a reduction of the nodes/seconds. That means StockFish LS shouldn't do stupid blunders. This range is quite good tuned and the ELO values are compareable to the SSDF ELO. In the range between 1000 and 1949 ELO StockFish LS uses beside a reduction of the nps the internal SkillLevels. That means StockFish plays positional weaker moves, and on low levels it can also do blunders. This range is not much tuned and I would be happy about feedback.
I turned down the default value for agressivity and erased the value for cowardice. I am satisfied with the style because StockFish plays quite balanced, more fitting to the weakened strength. But you can also switch to the old values of 100.
The limited StockFish LS will play at the same strength on different machines as long as it can reach the nps limit.
If you look at the sources please note that I am not a professional programmer.
My compile is 3 times slower than the original StockFish. That doesn't matter for the weak levels but maybe an expert want to try his luck.
Alex
Problems with pondering fixed. Seems to run pretty stable now.
Alex
-
- Posts: 608
- Joined: Wed Oct 13, 2010 9:44 am
- Location: Australia
Linux
It sounds an interesting idea. But linux build fails
$ make profile-build ARCH=x86-32
search.cpp:40:21: error: windows.h: No such file or directory
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Value, Depth)’:
search.cpp:955: error: there are no arguments to ‘Sleep’ that depend on a template parameter, so a declaration of ‘Sleep’ must be available
search.cpp:955: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Value, Depth) [with <unnamed>::NodeType PvNode = PV, bool SpNode = false, bool Root = true]’:
search.cpp:556: instantiated from here
search.cpp:947: warning: converting to ‘int’ from ‘double’
search.cpp:955: error: ‘Sleep’ was not declared in this scope
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Value, Depth) [with <unnamed>::NodeType PvNode = PV, bool SpNode = true, bool Root = false]’:
search.cpp:2200: instantiated from here
search.cpp:947: warning: converting to ‘int’ from ‘double’
$ make profile-build ARCH=x86-32
search.cpp:40:21: error: windows.h: No such file or directory
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Value, Depth)’:
search.cpp:955: error: there are no arguments to ‘Sleep’ that depend on a template parameter, so a declaration of ‘Sleep’ must be available
search.cpp:955: error: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Value, Depth) [with <unnamed>::NodeType PvNode = PV, bool SpNode = false, bool Root = true]’:
search.cpp:556: instantiated from here
search.cpp:947: warning: converting to ‘int’ from ‘double’
search.cpp:955: error: ‘Sleep’ was not declared in this scope
search.cpp: In function ‘Value<unnamed>::search(Position&, SearchStack*, Value, Value, Depth) [with <unnamed>::NodeType PvNode = PV, bool SpNode = true, bool Root = false]’:
search.cpp:2200: instantiated from here
search.cpp:947: warning: converting to ‘int’ from ‘double’
-
- Posts: 319
- Joined: Fri Dec 18, 2009 11:40 am
- Location: Naperville, IL
-
- Posts: 2559
- Joined: Fri Nov 26, 2010 2:00 pm
- Location: Czech Republic
- Full name: Martin Sedlak
Re: Linux
Also note that Sleep() on Windows has (like GetTickCount) a granularity of ~15ms (might vary depending on system). So Sleep(1) or Sleep(15) will do esentially the same thing. Which sucks of courseUncombedCoconut wrote:Sleep() is a Windows API function that sleeps a specified number of milliseconds. On Linux you can call nanosleep() instead. For instance, the msleep function at the end of this page implements Sleep(). You should include <time.h> instead of <windows.h>.
Martin
-
- Posts: 1203
- Joined: Thu May 10, 2007 2:49 pm
Re: Linux
Hi,
I have no Linux and I am not a programmer. You can try to replace the search.cpp with this one, maybe it works: http://www.mediafire.com/?adutf1f6t10qn5q
Alex
I have no Linux and I am not a programmer. You can try to replace the search.cpp with this one, maybe it works: http://www.mediafire.com/?adutf1f6t10qn5q
Alex
-
- Posts: 608
- Joined: Wed Oct 13, 2010 9:44 am
- Location: Australia
Scidvspc UCI feature
Well spokenAlexander Schmidt wrote:I have no Linux and I am not a programmer.
No...You can try to replace the search.cpp with this one, maybe it works: http://www.mediafire.com/?adutf1f6t10qn5q
Alex
StockFishLS/src/main.cpp:57: undefined reference to `init_search()'
thread.o: In function `start_routine':
I wonder if no-one simply has approximations of the skill levels as ELO.
They are meant to be CPU indendpendent i think.
I think i'm going to include Stockfish with Scid vs. PC one day, and kill off Scidlet.
Anyway, I've given Scid's stupid Player vs. UCI Engine feature a tune up todey. It has pause/resume, draw and mate detection now.
Oh yeah, and the time clocks have been made to half work too. God knows how Pascal could write quite
complicated features like this and then not spend the few hours to make them
- you know - useable. Been fixing this thing for years now.
svn co https://scidvspc.svn.sourceforge.net/svnroot/scidvspc
I'll try to remember to put a new windows beta gui up in the morning when my internet is going a bit faster.
-
- Posts: 1203
- Joined: Thu May 10, 2007 2:49 pm
Re: Scidvspc UCI feature
I think it should be easy for an expert to create a linux version.stevenaaus wrote:No...
StockFishLS/src/main.cpp:57: undefined reference to `init_search()'
thread.o: In function `start_routine':
I only added a few lines of code in search.cpp:
Code: Select all
//Limit nps: Enable skill level for UCI_Limitstrength feature ELO 1000-1949
if (Options["UCI_LimitStrength"].value<bool>() == true)
{
if (Options["UCI_Elo"].value<int>() <= 1949)
{
SkillLevel = (((Options["UCI_Elo"].value<int>())/50) - 19);
}
else SkillLevel = 20; // Reset SkillLevel in UCI_LimitStrength mode
}
Code: Select all
// limit nps
int t = current_search_time()+1;
int npslimit;
if ((Options["UCI_LimitStrength"].value<bool>()) == true)
{
if (depth <=4) { nodes = 0;}
if (Options["UCI_Elo"].value<int>() >= 1950)
{
npslimit = 500*pow(int(2),float(Options["UCI_Elo"].value<int>()-1950)/110);
}
else npslimit = 1750; // nps limit for all SkillLevels below 1950 ELO
while ( !StopRequest && ( nodes * 1000 / (t)) > npslimit )
{
t = current_search_time()+1;
poll (pos);
Sleep (10);
}
}
Code: Select all
o["UCI_LimitStrength"] = UCIOption(false);
o["UCI_Elo"] = UCIOption(2000, 1000, 2800);
I don't think so. They simply used the MultiPV feature to chose bad moves. With higher nps they still calculate deeper.stevenaaus wrote:I wonder if no-one simply has approximations of the skill levels as ELO.
They are meant to be CPU indendpendent i think.
My estimation is that SkillLevel 19 is 150 ELO weaker than SkillLevel 20.
Alex