New chess engine: Texel

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

Moderators: hgm, Rebel, chrisw

petero2
Posts: 687
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: New chess engine: Texel

Post by petero2 »

Correct VC++ 2012 beta does not support XP. See http://connect.microsoft.com/VisualStud ... ils/690617

There is supposedly a way around that, see http://tedwvc.wordpress.com/2012/03/11/ ... indows-xp/. It seems a bit complicated though.
User avatar
pocopito
Posts: 238
Joined: Tue Jul 12, 2011 1:31 pm

Re: New chess engine: Texel

Post by pocopito »

Congrats and thanks Peter

I've tested texel under xubuntu 11-10 64bit with ScidVSpc. The texel32 seems to work fine but the texel62 returns an error (but it could be due to have a one bit old version).

Regards

E Diaz
Two first meanings of the dutch word "leren":
1. leren [vc] (learn, larn, acquire) acquire or gain knowledge or skills.
2. leren [v] (teach, learn, instruct) impart skills or knowledge to.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: New chess engine: Texel

Post by zullil »

petero2 wrote:Thanks for the info. I don't know what is wrong with the directory permissions. If it is the same user that created the directory and that tries to write to it I think rwx------ should be ok.
It is very strange.

My modified Makefile:

Code: Select all

LZsMacPro-OSX6: ~/Downloads/texel101] more Makefile 
SRC     = bitBoard.cpp book.cpp computerPlayer.cpp enginecontrol.cpp evaluate.cpp \
          game.cpp history.cpp humanPlayer.cpp killerTable.cpp kpkTable.cpp \
          krkpTable.cpp move.cpp moveGen.cpp parameters.cpp piece.cpp position.cpp \
          random.cpp search.cpp texel.cpp textio.cpp transpositionTable.cpp \
          treeLogger.cpp tuigame.cpp uciprotocol.cpp util.cpp
OBJS32  = $(patsubst %.cpp,obj32/%.o,$(SRC))
OBJS64  = $(patsubst %.cpp,obj64/%.o,$(SRC))

CXX = g++-mp-4.7

CXXFLAGS        = -O3 -Wall -std=c++0x -pthread
LDFLAGS         = -pthread

all     : texel64

dist    : texel.zip

texel.zip: FORCE texel32 texel64
        (VER=$$(echo -e 'uci\nquit' | ./texel32 | grep 'id name' | awk '{print $$4}' | tr -d .) ; \
         rm -f texel$${VER}.zip ; \
         zip -r texel$${VER}.zip Makefile src texel{32,64}{,.exe})

$(OBJS32) : obj32/%.o : src/%.cpp
        -mkdir -p obj32
        $&#40;CXX&#41; $&#40;CXXFLAGS&#41; -m32 -c -o $@ $<

texel32  &#58; $&#40;OBJS32&#41; Makefile
        $&#40;CXX&#41; $&#40;LDFLAGS&#41; -m32 -o $@ $&#40;OBJS32&#41;


$&#40;OBJS64&#41; &#58; obj64/%.o &#58; src/%.cpp
        -mkdir -p obj64
        $&#40;CXX&#41; $&#40;CXXFLAGS&#41; -m64 -c -o $@ $<

texel64  &#58; $&#40;OBJS64&#41; Makefile
        $&#40;CXX&#41; $&#40;LDFLAGS&#41; -m64 -o $@ $&#40;OBJS64&#41;


clean   &#58; 
        rm -rf $&#40;OBJS&#41; *~ obj32 obj64

.PHONY  &#58; clean dist FORCE
LZsMacPro-OSX6&#58; ~/Downloads/texel101&#93; 
The error:

Code: Select all

LZsMacPro-OSX6&#58; ~/Downloads/texel101&#93; make
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/bitBoard.o src/bitBoard.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/book.o src/book.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/computerPlayer.o src/computerPlayer.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/enginecontrol.o src/enginecontrol.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/evaluate.o src/evaluate.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/game.o src/game.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/history.o src/history.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/humanPlayer.o src/humanPlayer.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/killerTable.o src/killerTable.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/kpkTable.o src/kpkTable.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/krkpTable.o src/krkpTable.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/move.o src/move.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/moveGen.o src/moveGen.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/parameters.o src/parameters.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/piece.o src/piece.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/position.o src/position.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/random.o src/random.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/search.o src/search.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/texel.o src/texel.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/textio.o src/textio.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/transpositionTable.o src/transpositionTable.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/treeLogger.o src/treeLogger.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/tuigame.o src/tuigame.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/uciprotocol.o src/uciprotocol.cpp
mkdir -p obj64
g++-mp-4.7 -O3 -Wall -std=c++0x -pthread -m64 -c -o obj64/util.o src/util.cpp
g++-mp-4.7 -pthread -m64 -o texel64 obj64/bitBoard.o obj64/book.o obj64/computerPlayer.o obj64/enginecontrol.o obj64/evaluate.o obj64/game.o obj64/history.o obj64/humanPlayer.o obj64/killerTable.o obj64/kpkTable.o obj64/krkpTable.o obj64/move.o obj64/moveGen.o obj64/parameters.o obj64/piece.o obj64/position.o obj64/random.o obj64/search.o obj64/texel.o obj64/textio.o obj64/transpositionTable.o obj64/treeLogger.o obj64/tuigame.o obj64/uciprotocol.o obj64/util.o
ld&#58; can't write output file&#58; texel64 for architecture x86_64
collect2&#58; error&#58; ld returned 1 exit status
make&#58; *** &#91;texel64&#93; Error 1
LZsMacPro-OSX6&#58; ~/Downloads/texel101&#93; 
The same command, invoked directly, works:

Code: Select all

LZsMacPro-OSX6&#58; ~/Downloads/texel101&#93; g++-mp-4.7 -pthread -m64 -o texel64 obj64/bitBoard.o obj64/book.o obj64/computerPlayer.o obj64/enginecontrol.o obj64/evaluate.o obj64/game.o obj64/history.o obj64/humanPlayer.o obj64/killerTable.o obj64/kpkTable.o obj64/krkpTable.o obj64/move.o obj64/moveGen.o obj64/parameters.o obj64/piece.o obj64/position.o obj64/random.o obj64/search.o obj64/texel.o obj64/textio.o obj64/transpositionTable.o obj64/treeLogger.o obj64/tuigame.o obj64/uciprotocol.o obj64/util.o
LZsMacPro-OSX6&#58; ~/Downloads/texel101&#93; 
LZsMacPro-OSX6&#58; ~/Downloads/texel101&#93; ls
Makefile    obj64       src         texel32     texel32.exe texel64     texel64.exe
LZsMacPro-OSX6&#58; ~/Downloads/texel101&#93; 
voyagerOne
Posts: 154
Joined: Tue May 17, 2011 8:12 pm

Re: New chess engine: Texel

Post by voyagerOne »

Impressive work as always Peter!

You are a genius programmer. I hope one day I can be as competent as you are...

Bill
www.mytopcoder.com/gmol
User avatar
Jim Ablett
Posts: 1383
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: New chess engine: Texel

Post by Jim Ablett »

Image

JA builds available.

Windows/Linux/Android 64/32


Should work on all systems.

http://dl.dropbox.com/u/5047625/texel-101-ja.zip
Mirror:
http://cl.ly/FHyX/texel-101-ja.zip

Also on my homepage.

Thanks very much for the new engine release Peter.

Jim.
petero2
Posts: 687
Joined: Mon Apr 19, 2010 7:07 pm
Location: Sweden
Full name: Peter Osterlund

Re: New chess engine: Texel

Post by petero2 »

Thanks a lot Jim.

It works perfectly on the systems I tested on (windows/linux/android), although I don't have Windows XP so I can not test that.

Your windows executables are about 15% faster than my windows executables, which means that the windows executables are now about as fast as the linux executables. Very nice.

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

Re: New chess engine: Texel

Post by Jim Ablett »

petero2 wrote:Thanks a lot Jim.

It works perfectly on the systems I tested on (windows/linux/android), although I don't have Windows XP so I can not test that.

Your windows executables are about 15% faster than my windows executables, which means that the windows executables are now about as fast as the linux executables. Very nice.

Thanks again.
You're welcome. :)

It is possible to successfully compile the source with an older, unsupported version of GCC is you use the Boost libraries to handle the c++0x stuff.

Code: Select all

Add this to all header files >

--------------------------------------------------

#include <boost/thread.hpp>
#include <boost/thread/thread.hpp> 
#include <boost/date_time/posix_time/posix_time.hpp>
#include <boost/chrono.hpp>
#include <cmath>

namespace std &#123;
  using boost&#58;&#58;mutex;
  using boost&#58;&#58;recursive_mutex;
  using boost&#58;&#58;lock_guard;
  using boost&#58;&#58;condition_variable;
  using boost&#58;&#58;unique_lock;
  using boost&#58;&#58;thread;
  using boost&#58;&#58;this_thread&#58;&#58;sleep;
&#125;

#ifndef nanosleep
#define nanosleep sleep
#endif

------------------------------------------------------


In 'enginecontrol.cpp' change to this >


-----------------------------------------------------------------

//   std&#58;&#58;this_thread&#58;&#58;sleep_for&#40;std&#58;&#58;chrono&#58;&#58;milliseconds&#40;10&#41;);
			
boost&#58;&#58;this_thread&#58;&#58;sleep&#40;boost&#58;&#58;posix_time&#58;&#58;microseconds&#40;10000&#41;);

--------------------------------------------------------

In 'util.cpp' change to this >

---------------------------------------------------

S64 currentTimeMillis&#40;) &#123;
   
   // auto t = std&#58;&#58;chrono&#58;&#58;system_clock&#58;&#58;now&#40;); 
	
    auto t = boost&#58;&#58;chrono&#58;&#58;system_clock&#58;&#58;now&#40;);

    auto t0 = t.time_since_epoch&#40;);
    auto x = t0.count&#40;);
    typedef decltype&#40;t0&#41; T0Type;
    auto n = T0Type&#58;&#58;period&#58;&#58;num;
    auto d = T0Type&#58;&#58;period&#58;&#58;den;
    return &#40;S64&#41;&#40;x * &#40;1000.0 * n / d&#41;);
&#125;


--------------------------------------------------------------

and link with >

Code: Select all

-lboost_thread-mgw46-mt-1_49.dll -lboost_chrono-mgw46-mt-1_49.dll -lboost_system-mgw46-mt-1_49.dll

Jim.
Adam Hair
Posts: 3226
Joined: Wed May 06, 2009 10:31 pm
Location: Fuquay-Varina, North Carolina

Re: New chess engine: Texel

Post by Adam Hair »

Thanks, Jim. Though, I suppose one day I will have to upgrade from XP.
User avatar
geots
Posts: 4790
Joined: Sat Mar 11, 2006 12:42 am

Re: New chess engine: Texel

Post by geots »

petero2 wrote:Thanks a lot Jim.

It works perfectly on the systems I tested on (windows/linux/android), although I don't have Windows XP so I can not test that.

Your windows executables are about 15% faster than my windows executables, which means that the windows executables are now about as fast as the linux executables. Very nice.

Thanks again.

Ok, Peter- I fell for the joke. When everyone is thru laughing, you can tell me where in hell this engine came from really. :) :roll:

george
User avatar
geots
Posts: 4790
Joined: Sat Mar 11, 2006 12:42 am

Re: New chess engine: Texel

Post by geots »

Jim Ablett wrote:Image

JA builds available.

Windows/Linux/Android 64/32


Should work on all systems.

http://dl.dropbox.com/u/5047625/texel-101-ja.zip
Mirror:
http://cl.ly/FHyX/texel-101-ja.zip

Also on my homepage.

Thanks very much for the new engine release Peter.

Jim.

Thanks my friend. You also saved me an email. :lol: Very very nice.


george