Rodent 0.12

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Jim Ablett
Posts: 1383
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Rodent 0.12

Post by Jim Ablett »

Here's my Rodent 0.12 GCC builds (Win32 & Linux 32/64) plus src+makefile which compiles cleanly.
I didn't include a Mingw64 compile because it runs slower than the Msvc/Intel ones from Dann & Dennis which
surprised me as the Mingw32 compile is faster.

http://dl.dropbox.com/u/5047625/rodent-012-gcc-ja.zip

Jim.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: Rodent 0.12

Post by lucasart »

lucasart wrote: while linux gives you nanosecond precision, I don't think windows' GetTickCount has a better resolution than a millisecond (or maybe even 10 ms...)
Actually, according to Micro$oft, GetTickCount and GetTickCount64 have a resolution between 10 and 16 ms :shock:

I couldn't find a proper timer that uses the CPU clock in the Windows API. And it seems that MSVC implements clock() by calling GetTickCount anyway.

As always, Windows sucks ;)
mar
Posts: 2554
Joined: Fri Nov 26, 2010 2:00 pm
Location: Czech Republic
Full name: Martin Sedlak

Re: Rodent 0.12

Post by mar »

lucasart wrote: Actually, according to Micro$oft, GetTickCount and GetTickCount64 have a resolution between 10 and 16 ms :shock:

I couldn't find a proper timer that uses the CPU clock in the Windows API. And it seems that MSVC implements clock() by calling GetTickCount anyway.

As always, Windows sucks ;)
You can try QueryPerformanceCounter/QueryPerformanceFrequency instead if you need really precise timing.
ZirconiumX
Posts: 1334
Joined: Sun Jul 17, 2011 11:14 am

Re: Rodent 0.12

Post by ZirconiumX »

Jim,

Your source is non-compileable (if there is such a word).

Code: Select all

g++ -c -g attacks.c  -Wall -O3 -Wno-write-strings 
attacks.c:33: error: integer constant is too large for 'long' type
attacks.c:33: error: integer constant is too large for 'long' type
attacks.c:35: error: integer constant is too large for 'long' type
attacks.c:35: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:49: error: integer constant is too large for 'long' type
attacks.c:49: error: integer constant is too large for 'long' type
attacks.c:50: error: integer constant is too large for 'long' type
attacks.c:50: error: integer constant is too large for 'long' type
attacks.c:58: error: integer constant is too large for 'long' type
attacks.c:58: error: integer constant is too large for 'long' type
attacks.c:59: error: integer constant is too large for 'long' type
attacks.c:59: error: integer constant is too large for 'long' type
make: *** [attacks.o] Error 1
Yes, I know - my GCC is _ancient_ (4.0.1) - and I'll try to build myself a copy of clang(++).

Matthew:out
Some believe in the almighty dollar.

I believe in the almighty printf statement.
User avatar
rvida
Posts: 481
Joined: Thu Apr 16, 2009 12:00 pm
Location: Slovakia, EU

Re: Rodent 0.12

Post by rvida »

lucasart wrote:
lucasart wrote: while linux gives you nanosecond precision, I don't think windows' GetTickCount has a better resolution than a millisecond (or maybe even 10 ms...)
Actually, according to Micro$oft, GetTickCount and GetTickCount64 have a resolution between 10 and 16 ms :shock:

I couldn't find a proper timer that uses the CPU clock in the Windows API. And it seems that MSVC implements clock() by calling GetTickCount anyway.

As always, Windows sucks ;)
You can get 1ms precision using timeBeginPeriod, timeEndPeriod and timeGetTime functions.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx
The default precision of the timeGetTime function can be five milliseconds or more, depending on the machine. You can use the timeBeginPeriod and timeEndPeriod functions to increase the precision of timeGetTime.
User avatar
Jim Ablett
Posts: 1383
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: Rodent 0.12

Post by Jim Ablett »

ZirconiumX wrote:Jim,

Your source is non-compileable (if there is such a word).

Code: Select all

g++ -c -g attacks.c  -Wall -O3 -Wno-write-strings 
attacks.c:33: error: integer constant is too large for 'long' type
attacks.c:33: error: integer constant is too large for 'long' type
attacks.c:35: error: integer constant is too large for 'long' type
attacks.c:35: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:37: error: integer constant is too large for 'long' type
attacks.c:49: error: integer constant is too large for 'long' type
attacks.c:49: error: integer constant is too large for 'long' type
attacks.c:50: error: integer constant is too large for 'long' type
attacks.c:50: error: integer constant is too large for 'long' type
attacks.c:58: error: integer constant is too large for 'long' type
attacks.c:58: error: integer constant is too large for 'long' type
attacks.c:59: error: integer constant is too large for 'long' type
attacks.c:59: error: integer constant is too large for 'long' type
make: *** [attacks.o] Error 1
Yes, I know - my GCC is _ancient_ (4.0.1) - and I'll try to build myself a copy of clang(++).

Matthew:out
Hi Matthew,

If you are using an old version of GCC (and you are) add '

Code: Select all

-fpermissive
' to the options in the makefile.

You will get lots of warnings when compiling, but it should build and run ok.

Jim.
User avatar
Graham Banks
Posts: 41416
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Rodent 0.12

Post by Graham Banks »

PK wrote: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.
Hi Pawel,

I started testing Rodent 0.12, but had to give up because I was getting time losses on the final move before either the first or second time control.
Never had that issue with Rodent 0.10, which was the last version I tested.

Graham.
gbanksnz at gmail.com
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: Rodent 0.12

Post by PK »

developement version has this bug fixed, but unfortunately king safety code is under a major rewrite, so I cannot release right now.
User avatar
Graham Banks
Posts: 41416
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Rodent 0.12

Post by Graham Banks »

PK wrote:developement version has this bug fixed, but unfortunately king safety code is under a major rewrite, so I cannot release right now.
No hurry. Thanks. 8-)
gbanksnz at gmail.com
diep
Posts: 1822
Joined: Thu Mar 09, 2006 11:54 pm
Location: The Netherlands

Re: Rodent 0.12

Post by diep »

rvida wrote:
lucasart wrote:
lucasart wrote: while linux gives you nanosecond precision, I don't think windows' GetTickCount has a better resolution than a millisecond (or maybe even 10 ms...)
Actually, according to Micro$oft, GetTickCount and GetTickCount64 have a resolution between 10 and 16 ms :shock:

I couldn't find a proper timer that uses the CPU clock in the Windows API. And it seems that MSVC implements clock() by calling GetTickCount anyway.

As always, Windows sucks ;)
You can get 1ms precision using timeBeginPeriod, timeEndPeriod and timeGetTime functions.

http://msdn.microsoft.com/en-us/library ... 85%29.aspx
The default precision of the timeGetTime function can be five milliseconds or more, depending on the machine. You can use the timeBeginPeriod and timeEndPeriod functions to increase the precision of timeGetTime.
while gettickcount does give you milliseconds precision, it's very accurate milliseconds precision, which effectively is more accurate than linux microsecondsprecision in GetTimeOfDay; for the simple reason that windows kernel is in assembler and this is just moving the register to the user function, whereas the linux kernel is in C, so it's less accurate than GetTickCount, other than the millisecond resolution you get back versus microsecond resolution.

the msdn writing on this is like 20 years old by now or so, ignore it.