open source gift for Christmas

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

Moderators: hgm, Rebel, chrisw

PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: open source gift for Christmas

Post by PK »

Graham, thanks for the logo, this cartoon creature is actually hilarious :)

as for makefile, I have actually next to none experience with it - probably the way to go would be to choose a simple one (Gerbil's?) and to type in the names of object files ( "blahblah.o" for each "blahblah.cpp")

anyhow, I guess that the next version should be at least gcc-compatibile.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: open source gift for Christmas

Post by lucasart »

PK wrote:Graham, thanks for the logo, this cartoon creature is actually hilarious :)

as for makefile, I have actually next to none experience with it - probably the way to go would be to choose a simple one (Gerbil's?) and to type in the names of object files ( "blahblah.o" for each "blahblah.cpp")

anyhow, I guess that the next version should be at least gcc-compatibile.
Here's my make file. It should be in the source directory and called "Makefile" (respect lower/upper case!)

Code: Select all

CC=gcc
CFLAGS=-O3 -std=c99 -DPOSIX -DNDEBUG -Wall
LDFLAGS=-flto
SOURCES=bitboard.c board.c eval.c magic.c main.c move.c movegen.c movesort.c psq.c search.c tt.c uci.c uci_option.c util.c zobrist.c
OBJECTS=$(SOURCES:.c=.o)
EXECUTABLE=DC

all: $(SOURCES) $(EXECUTABLE)
	
$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.c.o&#58; $&#40;CC&#41; $&#40;CFLAGS&#41; $< -o $@
You need to modify it by replacing gcc with g++, and change the "SOURCES" and CFLAGS accordingly.

Note that your code is not portable, because it contains incorrect "extern inline". This construction is illegal and makes no sense. I don't understand how MSVC allows it: each compiling unit is done independantly, so the compiler can't possible inline with sth in another compiling unit, this can only be done by the link time optimizer. inline functions should be defined in the *.h file. It's the only correct way, if you want to comply to the ISO/C++ standard. Once you fix this, there are only few warnings (mainly about some dubious casts), but it compiles.
Also another problem, I noticed that there's no option "Hash". Is it normal ? Sungorus had this option, and the UCI protocol specifies that such an option should be called "Hash" and nothing else (not "Hash Size").
I suppose the above would be a trivial fix ?[/code]
User avatar
pocopito
Posts: 238
Joined: Tue Jul 12, 2011 1:31 pm

Re: open source gift for Christmas

Post by pocopito »

Thanks for the engine and the info about toga log.

Afew weeks ago I created a post here related to the (imo) lack of info provided by the engines: you just get a number, and in many cases, specially when it's close to 0, you'd like to know a bit more about the origin of this evaluation. And I guess that's what is provided by this tool.
PK
Posts: 893
Joined: Mon Jan 15, 2007 11:23 am
Location: Warsza

Re: open source gift for Christmas

Post by PK »

here comes a little hurried update, nothing spectacular, perhaps +30 Elo

http://www.koziol.home.pl/rodent_0.10.zip

Changes:

- no "extern inline" rubbish
- KRK checkmate bug corrected
- simplified mobility evaluation
- late move pruning near the leaves
- static null move near the leaves
Pablo Vazquez
Posts: 154
Joined: Thu May 31, 2007 9:05 pm
Location: Madrid, Spain

Re: open source gift for Christmas

Post by Pablo Vazquez »

PK wrote:here comes a little hurried update, nothing spectacular, perhaps +30 Elo

http://www.koziol.home.pl/rodent_0.10.zip

Changes:

- no "extern inline" rubbish
- KRK checkmate bug corrected
- simplified mobility evaluation
- late move pruning near the leaves
- static null move near the leaves
Thanks Pawel.
User avatar
lucasart
Posts: 3232
Joined: Mon May 31, 2010 1:29 pm
Full name: lucasart

Re: open source gift for Christmas

Post by lucasart »

PK wrote:here comes a little hurried update, nothing spectacular, perhaps +30 Elo

http://www.koziol.home.pl/rodent_0.10.zip

Changes:

- no "extern inline" rubbish
- KRK checkmate bug corrected
- simplified mobility evaluation
- late move pruning near the leaves
- static null move near the leaves
Thank you Pawel. Great news.

Check your personal messages, I sent you one regarding compiling and how to make it more portable.

I will test Rodent 0.10 in my Open Source Blitz Rating List, results tomorrow in the Tournament forum :D