Stockfish 1.01 FIX A SERIOUS BUG

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Stockfish 1.01 FIX A SERIOUS BUG

Post by mcostalba »

Sorry to everybody but after some testing I have found the bug spotted by Tord seriously affect performance.

So I have quickly done a new bug fix version:

http://www.mediafire.com/?niwhtmhiel2

Please Jim, would you be so kind to redo the exe for this updates sources ?

And please to all the people that is testing 1.0, pelase update to 1.01

Very sorry again for this trouble :oops:


Thanks for your patience
Marco
User avatar
Jim Ablett
Posts: 2287
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by Jim Ablett »

mcostalba wrote:Sorry to everybody but after some testing I have found the bug spotted by Tord seriously affect performance.

So I have quickly done a new bug fix version:

http://www.mediafire.com/?niwhtmhiel2

Please Jim, would you be so kind to redo the exe for this updates sources ?

And please to all the people that is testing 1.0, pelase update to 1.01

Very sorry again for this trouble :oops:


Thanks for your patience
Marco
Hi Marco,

New Windows builds here (x64/win32) > http://www.mediafire.com/?j0nwytjthfy

regards,
Jim.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by Dann Corbit »

Minor suggestion, make sure ret is initialized:

Code: Select all

  template<typename T>
  T get_option_value(const std::string& optionName) {

      T ret(0); // to initialize in case of fall-through.
      Options::iterator it = option_with_name(optionName);

      if (it != options.end())
      {
          std::istringstream ss(it->currentValue);
          ss >> ret;
      }
      return ret;
  }
gerold
Posts: 10121
Joined: Thu Mar 09, 2006 12:57 am
Location: van buren,missouri

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by gerold »

mcostalba wrote:Sorry to everybody but after some testing I have found the bug spotted by Tord seriously affect performance.

So I have quickly done a new bug fix version:

http://www.mediafire.com/?niwhtmhiel2

Please Jim, would you be so kind to redo the exe for this updates sources ?

And please to all the people that is testing 1.0, pelase update to 1.01

Very sorry again for this trouble :oops:

Run 10 games this morning when you first posted. It did ok for me.
It was a little slow but was pretty strong.
Best to you,

Gerold.

P.S. Be happy to down load the new version and test it.


Thanks for your patience
Marco
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by Dann Corbit »

Dann Corbit wrote:Minor suggestion, make sure ret is initialized:

Code: Select all

  template<typename T>
  T get_option_value(const std::string& optionName) {

      T ret(0); // to initialize in case of fall-through.
      Options::iterator it = option_with_name(optionName);

      if (it != options.end())
      {
          std::istringstream ss(it->currentValue);
          ss >> ret;
      }
      return ret;
  }
Nevermind, it causes an exception to initialize a string to zero.
But this does mean collection of UCI parameters can result in undefined behavior.
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by Dann Corbit »

First impression:
Stockfish looks really strong. It seems to outsearch everyone. And I am using my MS VC++ build. Jim's build will probably be quite a bit faster.
mcostalba
Posts: 2684
Joined: Sat Jun 14, 2008 9:17 pm

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by mcostalba »

Dann Corbit wrote:
Dann Corbit wrote:Minor suggestion, make sure ret is initialized:

Code: Select all

  template<typename T>
  T get_option_value(const std::string& optionName) {

      T ret(0); // to initialize in case of fall-through.
      Options::iterator it = option_with_name(optionName);

      if (it != options.end())
      {
          std::istringstream ss(it->currentValue);
          ss >> ret;
      }
      return ret;
  }
Nevermind, it causes an exception to initialize a string to zero.
But this does mean collection of UCI parameters can result in undefined behavior.

Yes, you are right Dann.

The code could be

Code: Select all

  template<typename T>
  T get_option_value(const std::string& optionName) {

      T ret = T(); // to initialize in case of fall-through.
      Options::iterator it = option_with_name(optionName);

      if (it != options.end())
      {
          std::istringstream ss(it->currentValue);
          ss >> ret;
      }
      return ret;
  }
C++ knows how to correclty initialize built-in types and it does the correct thing also with user defined ones (as long as they have a default and a copy constructor).


Thanks for the hint
Marco


P.S: A little C++ digression. You cannot use the form

Code: Select all


   T ret();

because otherwise the compiler thinks ret is a function taking no aguments and returning a value of type T.
User avatar
Graham Banks
Posts: 44636
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by Graham Banks »

Dann Corbit wrote:First impression:
Stockfish looks really strong. It seems to outsearch everyone. And I am using my MS VC++ build. Jim's build will probably be quite a bit faster.
I get extremely low kn/s counts here. Same for others?
gbanksnz at gmail.com
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by Dann Corbit »

Graham Banks wrote:
Dann Corbit wrote:First impression:
Stockfish looks really strong. It seems to outsearch everyone. And I am using my MS VC++ build. Jim's build will probably be quite a bit faster.
I get extremely low kn/s counts here. Same for others?
Not for me...
I get Glaurung like nodecounts, as expected.
E.g. I am getting 3.5 million NPS right now with 2 theads.
Try this one (it's 64 bit):
http://cap.connx.com/chess-engines/new- ... ckfish.zip
Dirt
Posts: 2851
Joined: Wed Mar 08, 2006 10:01 pm
Location: Irvine, CA, USA

Re: Stockfish 1.01 FIX A SERIOUS BUG

Post by Dirt »

Graham Banks wrote:
Dann Corbit wrote:First impression:
Stockfish looks really strong. It seems to outsearch everyone. And I am using my MS VC++ build. Jim's build will probably be quite a bit faster.
I get extremely low kn/s counts here. Same for others?
It sounds like you might have the same problem as I, where everything gets very slow. This includes opponent engines with ponder off.