ChessUSA.com TalkChess.com
Hosted by Your Move Chess & Games
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rodent 0.12
Goto page 1, 2, 3  Next
 
Post new topic       TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions Threaded
View previous topic :: View next topic  
Author Message
Pawel Koziol



Joined: 15 Jan 2007
Posts: 276
Location: Warsza

PostPosted: Wed Feb 29, 2012 9:05 pm    Post subject: Rodent 0.12 Reply to topic Reply with quote

available on its usual web page, www.koziol.home.pl/rodent

This version will probably stay for a while, as I will have insane amount of work in March. It's not much stronger than 0.11, but should be a bit more careful tactically.

Changes:

- some restructuring
- smarter time management (probably the most helpful modification)
- LMR code tweaked and simplified, history restriction enabled
- first draft of weakening code (may be enabled by #defines)
- loose pieces of endgame knowledge

Currently only the 32-bit compile is available, so I hope for some help

For the coming month I expect only to add more endgame stuff and release it as developement snapshots.
_________________
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
Back to top
View user's profile Send private message Visit poster's website
Rémi Coulom



Joined: 24 Apr 2006
Posts: 350

PostPosted: Wed Feb 29, 2012 9:16 pm    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

Your link is broken.
Back to top
View user's profile Send private message Visit poster's website
Pawel Koziol



Joined: 15 Jan 2007
Posts: 276
Location: Warsza

PostPosted: Wed Feb 29, 2012 9:36 pm    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

sorry for broken link.

www.koziol.home.pl/rodent.htm
_________________
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
Back to top
View user's profile Send private message Visit poster's website
Lucas Braesch



Joined: 31 May 2010
Posts: 1824

PostPosted: Thu Mar 01, 2012 10:37 am    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

PK wrote:
sorry for broken link.

www.koziol.home.pl/rodent.htm

thanks!

i'll compile it and run it in my open source bullet rating list

=> results available tomorrow in the tournament forum
Back to top
View user's profile Send private message
Lucas Braesch



Joined: 31 May 2010
Posts: 1824

PostPosted: Thu Mar 01, 2012 3:37 pm    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

lucasart wrote:
PK wrote:
sorry for broken link.

www.koziol.home.pl/rodent.htm

thanks!

i'll compile it and run it in my open source bullet rating list

=> results available tomorrow in the tournament forum

I couldn't compile it on Linux with g++. Here are all the warnings and errors, with solutions Very Happy

Code:
./eval/eval_pieces.c:110:20: warning: "/*" within comment [-Wcomment]

self explanatory

Code:
./parser.c: In member function ‘void sParser::UciLoop()’:
./parser.c:58:27: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
./parser.c: In member function ‘void sParser::ParsePosition(sPosition*, char*)’:
./parser.c:180:29: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]

The ISO C++ standard declares the char * cast of an std::string as deprecated. It may compile now, but it will not compile in ISO C++ 2011. The correct way to do it is to use .c_str() instead of an implicit cast.

Code:
./timer.c: In member function ‘void sTimer::Waste(int)’:
./timer.c:118:24: error: ‘nanosleep’ was not declared in this scope

I'm not sure why you need a sleep function in your program. Anyway nanosleep is indeed a POSIX function, but it's in <time.h>, not <sys/time.h>
Also the argument is not an int but a struct. Have a look here on how to use nanosleep (basically you need to specify a struct with seconds and nanoseconds)
http://linux.die.net/man/2/nanosleep

Code:
./search/report.c:23:21: fatal error: windows.h: No such file or directory
compilation terminated.

Obviously this can only work under Windows. I'm not sure what windows.h is need for in search.c, but if you can do without, just protect this section with a
Code:
#if defined(_WIN32) || defined(_WIN64)

the same way you did in timer.c

Code:

./search/quiescence.c: In member function ‘int sSearcher::Quiesce(sPosition*, int, int, int, int, int*)’:
./search/quiescence.c:64:39: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
./search/search.c: In member function ‘int sSearcher::Search(sPosition*, int, int, int, int, int, int, int, int*)’:
./search/search.c:242:63: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
./search/search.c: In member function ‘int sSearcher::CountLegalMoves(sPosition*, int)’:
./search/search.c:442:50: warning: suggest parentheses around assignment used as truth value [-Wparentheses]

self explanatory

With these fixes, your code should be compilable on Linux, MacOSX and Android, for example. So it would be nice to include them, unless you're not interested in portability and prefer to focus on Windows only, which is a shame of course Wink
Back to top
View user's profile Send private message
Pawel Koziol



Joined: 15 Jan 2007
Posts: 276
Location: Warsza

PostPosted: Fri Mar 02, 2012 10:24 am    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

hi,

thanks for Your input.

as for sleeping, it is used for weakening the engine. this feature is not activated yet, because it needs much more tuning than I can afford right now.

do You have access to code that wasets specific number of nanoseconds under Linux?
_________________
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
Back to top
View user's profile Send private message Visit poster's website
Lucas Braesch



Joined: 31 May 2010
Posts: 1824

PostPosted: Fri Mar 02, 2012 11:23 am    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

PK wrote:

do You have access to code that wasets specific number of nanoseconds under Linux?

Yes, the link I sent you. There is also usleep (if you want microseconds).

In fact it's probably easier to use usleep, unless you really need nanosecond precision and to not be polluted by signals.

Using usleep couldn't be easier:

Code:
#include <unistd.h>

int usleep(useconds_t usec);

(usec is expressed in microseconds)
Back to top
View user's profile Send private message
Lucas Braesch



Joined: 31 May 2010
Posts: 1824

PostPosted: Fri Mar 02, 2012 11:50 am    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

also for the sake of portability (as well as simplicity), you could use the ISO C function clock() instead of all this
Code:
int sTimer::GetMS(void)
{
#if defined(_WIN32) || defined(_WIN64)
  return GetTickCount();
#else
  struct timeval tv;

  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000 + tv.tv_usec / 1000;
#endif
}

while linux gives you nanosecond precision, I don't think windows' GetTickCount has a better resolution than a millisecond (or maybe even 10 ms...), so there's no point in all this complication.

Much easier and fully portable:

Code:

#include <time.h>

clock_t start = clock();
...
clock_t stop = clock();

unsigned duration_milliseconds = (stop - start) * 1000 / CLOCKS_PER_SEC;


Anyway, I fixed your code and compiled it. I'll test it in my Open Source Bullet rating list. As usual results tomorrow in the tournament forum Very Happy
Back to top
View user's profile Send private message
Michel Van den Bergh



Joined: 28 Sep 2008
Posts: 1260

PostPosted: Fri Mar 02, 2012 12:03 pm    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

Quote:
In fact it's probably easier to use usleep, unless you really need nanosecond precision and to not be polluted by signals.


Well usleep is deprecated....

Code:
POSIX.1-2001  declares  this  function  obsolete;  use  nanosleep(2)  instead.
       POSIX.1-2008 removes the specification of usleep().
Back to top
View user's profile Send private message
Pawel Koziol



Joined: 15 Jan 2007
Posts: 276
Location: Warsza

PostPosted: Fri Mar 02, 2012 4:39 pm    Post subject: Re: Rodent 0.12 Reply to topic Reply with quote

64-bit compiles by Denis Mendoza and Dann Corbit are uploaded
developement snapshot with compatibility fixes will come after the weekend

busy regards,

pawel
_________________
Pawel Koziol
http://www.pkoziol.cal24.pl/rodent/rodent.htm
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic       TalkChess.com Forum Index -> Computer Chess Club: Programming and Technical Discussions All times are GMT
Goto page 1, 2, 3  Next
Threaded
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Powered by phpBB © 2001, 2005 phpBB Group
Enhanced with Moby Threads