Kohai 1.0 Released - a Senpai Derivative

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

Moderators: hgm, Rebel, chrisw

User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Kohai 1.0 Released - a Senpai Derivative

Post by MikeB »

Kōhai 1.0 is a direct derivative of Senpai 1.0. The changes made are very modest and were related to LMR Reductions and piece values. I estimate the increase to be about modest ~10 ELO over Senpai 1.0.

Code: Select all

Rank Name                    Elo    +    - games score oppo. draws 
   1 Gull 3.1 x64           3242   10   10  2700   71%  3084   29% 
   2 Kōhai 1.0              3158   10   10  2700   59%  3094   35% 
   3 Kōhai 1.1              3154   10   10  2700   58%  3094   35% 
   4 Hakkapeliitta TCEC v2  3153   10   10  2700   58%  3094   27% 
   5 Senpai 1.0             3146   10   10  2700   57%  3095   34% 
   6 Texel 1.05 64-bit      3104   10   10  2700   50%  3100   28% 
   7 Crafty-25.1-syzygy     3058   10   10  2700   44%  3105   28% 
   8 Deep HIARCS 14 WCSC    3052   10   10  2700   43%  3105   28% 
   9 Deep Shredder 12 x64   2981   10   10  2700   32%  3113   28% 
  10 Arasan 19.0            2954   10   10  2700   29%  3116   25% 
Kōhai 1.1 was a beta version used in final testing.

https://github.com/MichaelB7/Kohai-Chess

There is a MAC exe on github, feel free to compile versions for other OS. Adjust makefile as required.

Contributors welcome!!
User avatar
GONeill
Posts: 87
Joined: Sun Jun 15, 2014 6:40 am
Location: New Zealand
Full name: Graham O'Neill

Re: Kohai 1.0 Released - a Senpai Derivative

Post by GONeill »

With directories D:\Mingw, D:\Mingw\Kohai-Chess-master and D:\Arena\Engines\Kohai these are my files to compile under Win10 i7-4790 Haswell.

D:\Mingw\Kohai.bat

Code: Select all

@echo off
TITLE Compile Kohai source

REM ----------------------------------------------------------------------------------------
REM   talk=0   Hide some text, no pauses during compilation
REM   talk=1   Show extra info and pause during compilation
REM ----------------------------------------------------------------------------------------
set talk=1

REM ----------------------------------------------------------------------------------------
REM   Program paths and names
REM ----------------------------------------------------------------------------------------
set mindir=D:\MinGW
set srcdir=D:\MinGW\Kohai-Chess-master
set engdir=D:\Arena\Engines\Kohai
set cmpnam=Kohai-Chess-master.exe
set newnam=Kohai_1_64bit.exe

echo.
echo ---------------------
for /f "skip=1" %%D in ('WMIC os get LocalDateTime') do (set LIDATE=%%D & goto GOT_DATE)
:GOT_DATE
rem LIDATE fields:
rem     yymmdd  %LIDATE:~2,6%
rem     ccyy    %LIDATE:~0,4%
rem     mm      %LIDATE:~4,2%
rem     dd      %LIDATE:~6,2%
rem     hh      %LIDATE:~8,2%
rem     mm      %LIDATE:~10,2%
rem     ss      %LIDATE:~12,2%
set date1=%LIDATE:~2,6%
echo  Date is %date1%
echo ---------------------

echo.
echo ---------------------
echo  Set PATH
echo ---------------------
set PATH=%mindir%\mingw64\bin;%mindir%\msys\1.0\bin;%PATH%
if %talk%==1 echo %PATH%

cd %srcdir%
if %talk%==1 echo.
if %talk%==1 pause

echo.
echo -----------------------------
echo  Compile sources using gcc
echo -----------------------------
mingw32-make g-gon -j 8
if errorlevel 1 goto COMPERR 
if %talk%==1 echo.
if %talk%==1 pause

echo.
echo ---------------------
echo  Tidy and rename
echo ---------------------
if exist kohai_%date1%.exe del kohai_%date1%.exe /q
ren %cmpnam% kohai_%date1%.exe
mingw32-make clean

echo.
echo ---------------------
echo  Copy to Arena
echo ---------------------
copy %srcdir%\kohai*.exe %engdir%\*.*
for %%v in (kohai*.exe) do del %%v /q
cd %engdir%
if exist "%newnam%" del "%newnam%" /q
copy kohai_%date1%.exe "%newnam%"

echo.
echo DONE!
if %talk%==1 pause
goto ENDP

:COMPERR
echo.
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo !!!   Compilation error   !!!
echo !!!!!!!!!!!!!!!!!!!!!!!!!!!!!
echo.
pause

:ENDP
D:\Mingw\Kohai-Chess-master\makefile

Code: Select all

#!/bin/bash

mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path))))
KOHAI= $(current_dir:.d=)


CC=g++
ICC=icc
OBJECTS=kohai.cpp
CXFLAGS-GP=-std=c++11 -pthread -O3 -march=corei7 -finline-functions -funroll-all-loops -fno-rtti -pthread -fprofile-generate
CXFLAGS-GR=-std=c++11 -pthread -O3 -march=corei7 -finline-functions -funroll-all-loops -fno-rtti -pthread -fprofile-use
CXFLAGS-GG=-std=c++11 -pthread -O3 -march=native -mtune=native -finline-functions -funroll-all-loops -fno-rtti -pthread -fprofile-use
CXFLAGS-IP=-std=c++11 -march=corei7 -xSSE4.2 -finline-functions -funroll-all-loops -fno-rtti -pthread -prof_gen
CXFLAGS-IR=-std=c++11 -ipo -march=corei7 -xSSE4.2 -finline-functions -funroll-all-loops -fno-rtti -pthread -prof_use
STRIP=strip


clean:
	rm -f *.o *.gcda *.dyn

g-pro:
	$(clean)
	$(CC) $(CXFLAGS-GP) $(OBJECTS) -o $(KOHAI)


g-rel:
	$(CC) $(CXFLAGS-GR) $(OBJECTS) -o $(KOHAI)
	$(STRIP) $(KOHAI)
	upx2 --lzma $(KOHAI)

i-pro:
	rm -f *.dyn
	$(ICC) $(CXFLAGS-IP) $(OBJECTS) -o $(KOHAI)

i-rel:
	$(ICC) $(CXFLAGS-IR) $(OBJECTS) -o $(KOHAI)
	$(STRIP) $(KOHAI)
	upx2 --lzma $(KOHAI)

g-gon:
	$(CC) $(CXFLAGS-GG) $(OBJECTS) -o $(KOHAI)
	$(STRIP) $(KOHAI).exe
Note that I:
  • changed the name of "g++"
    added "-march=native -mtune=native" as it seems to help with Stockfish
    added a ".exe" to the strip line
    removed upx2 (as it didn't work for me)
I'm no C++ expert so these may or may not make sense, but they do at least work!
karger
Posts: 218
Joined: Tue Feb 02, 2010 2:27 am
Full name: John Karger

Re: Kohai 1.0 Released - a Senpai Derivative

Post by karger »

Michael , Can you share a Windows executable ? Thanks , John Karger
User avatar
velmarin
Posts: 1600
Joined: Mon Feb 21, 2011 9:48 am

Re: Kohai 1.0 Released - a Senpai Derivative

Post by velmarin »

Good luck with project.

Executables windows, x64 and x32.
http://www.mediafire.com/download/4btlg ... indows.zip
supersharp77
Posts: 1242
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: Kohai 1.0 Released - a Senpai Derivative

Post by supersharp77 »

velmarin wrote:Good luck with project.

Executables windows, x64 and x32.
http://www.mediafire.com/download/4btlg ... indows.zip
Thanks Michael and Jose...God Bless...AR :)
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Kohai 1.0 Released - a Senpai Derivative

Post by MikeB »

The latest has a makefile change that sped Konai up by about 5%, which should be worth a couple of ELO. Latest Mac exe, make file etc are on Github.

The two crafty's below 0607c and 0607d were experimental versions which did not pan out obviously. Although northing new to report on crafty, you can rest assured it is being worked on.

Code: Select all

250 rounds and 13750 games completed...
time control: 1800+30
Date: 06/08/16 : 18:04:14
ResultSet>ResultSet>Unknown command: #readpgn
Rank Name                     Elo    +    - games score oppo. draws 
   1 Kōhai 1.0               3197   11   11  2500   64%  3090   29% 
   2 Senpai 1.0              3178   10   10  2500   62%  3092   30% 
   3 Hakkapeliitta TCEC v2   3172   11   11  2500   60%  3093   27% 
   4 Texel 1.05 64-bit       3148   10   10  2500   57%  3095   29% 
   5 Crafty-25.1-syzygy      3098   10   10  2500   50%  3100   33% 
   6 Crafty-25.1             3095   10   10  2500   49%  3101   36% 
   7 Deep HIARCS 14 WCSC     3081   10   10  2500   47%  3102   30% 
   8 Crafty-25.1.Syzy-0607c  3071   10   10  2500   46%  3103   35% 
   9 Crafty-25.1.Syzy-0607d  3069   10   10  2500   45%  3103   34% 
  10 Deep Shredder 12 x64    3021   10   10  2500   38%  3108   29% 
  11 Arasan 19.0             2971   11   11  2500   31%  3113   26% 
https://github.com/MichaelB7/Kohai-Chess
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: Kohai 1.0 Released - a Senpai Derivative

Post by Jamal Bubker »

Thanks very much Michael B for working and releasing this stronger derivative of Senpai :D
Jamal Bubker
Posts: 326
Joined: Mon May 24, 2010 4:32 pm

Re: Kohai 1.0 Released - a Senpai Derivative

Post by Jamal Bubker »

Thanks Jose for providing windows binaries !