Skip to content
This repository has been archived by the owner on May 4, 2021. It is now read-only.

Commit

Permalink
Version 10.10.3
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmonk committed Jan 2, 2017
1 parent 18fb696 commit 31ee39a
Show file tree
Hide file tree
Showing 25 changed files with 696 additions and 60 deletions.
8 changes: 4 additions & 4 deletions Code/ControlPGN.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ def actual(self):
rival = self.gestor.libro.nombre
elif tipoJuego in (kJugFics, kJugFide):
rival = self.gestor.nombreObj
elif self.gestor.xrival:
rival = self.gestor.xrival.nombre
else:
rival = "";
elif self.gestor.xrival: # foncap change
rival = self.gestor.xrival.nombre # foncap change
else: # foncap change
rival = "" # foncap change

jugador = self.gestor.configuracion.jugador
resultado = self.gestor.resultado
Expand Down
5 changes: 4 additions & 1 deletion Code/EnginesWindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def mas(cm):

cm = ConfigMotor("gaia", "Jean-Francois Romang, David Rabel", "3.5", "http://gaiachess.free.fr")
cm.path = "gaia32.exe"
cm.nombre = "Gaïa 3.5".decode("utf-8")
cm.elo = 2378
cm.ordenUCI("Ponder", "false")
mas(cm)
Expand Down Expand Up @@ -140,6 +141,8 @@ def mas(cm):
cm.elo = 2720
cm.ordenUCI("Hash", "32")
cm.ordenUCI("Ponder", "false")
cm.nombre = "Gödel 3.4.9".decode("utf-8")

mas(cm)

cm = ConfigMotor("rhetoric", "Alberto Sanjuan", "1.4.3", "http://www.chessrhetoric.com/")
Expand Down Expand Up @@ -255,7 +258,7 @@ def mas(cm):
cm.ponMultiPV(20, 64)
mas(cm)

cm = ConfigMotor("irina", "Lucas Monge", "0.12", "")
cm = ConfigMotor("irina", "Lucas Monge", "0.13", "")
cm.path = "irina.exe"
cm.elo = 1200
mas(cm)
Expand Down
2 changes: 1 addition & 1 deletion Code/Init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
DEBUG = False
VERSION = "10.10.2"
VERSION = "10.10.3"

import os
import sys
Expand Down
17 changes: 6 additions & 11 deletions Code/QT/Histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,9 @@ def drawBackground(self, painter, rect):
pen.setWidth(2)
pen.setColor(QtGui.QColor("#DE5044"))
painter.setPen(pen)
p = self.hserie.liPoints[self.pointActive]
painter.drawLine(p.rx, bottom, p.rx, top)
if 0 <= self.pointActive < len(self.hserie.liPoints):
p = self.hserie.liPoints[self.pointActive]
painter.drawLine(p.rx, bottom, p.rx, top)

def mousePressEvent(self, event):
super(Histogram, self).mousePressEvent(event)
Expand Down Expand Up @@ -430,15 +431,9 @@ def genHistograms(partida, sicentipawns):
alm.lijgW = lijgW
alm.lijgB = lijgB

alm.porcT = porcT*1.0/len(lijg)
if len(lijgW) != 0:
alm.porcW = porcW*1.0/len(lijgW)
else:
alm.porcW = 0;
if len(lijgB) != 0:
alm.porcB = porcB*1.0/len(lijgB)
else:
alm.porcB = 0;
alm.porcT = porcT*1.0/len(lijg) if len(lijg) else 0
alm.porcW = porcW*1.0/len(lijgW) if len(lijgW) else 0
alm.porcB = porcB*1.0/len(lijgB) if len(lijgB) else 0

return alm

Expand Down
1 change: 1 addition & 0 deletions Code/QT/PantallaManualSave.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
from Code import ControlPosicion
from Code import XVoyager
from Code import Partida

from Code.QT import Colocacion
from Code.QT import Controles
from Code.QT import Iconos
Expand Down
11 changes: 10 additions & 1 deletion Code/QT/PantallaPGN.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,16 @@ def gridDobleClick(self, grid, fila, oColumna):
def gridDobleClickCabecera(self, grid, oColumna):
clave = oColumna.clave
orden = self.dbf.orden
if orden.startswith(clave):
if clave == "PLIES":
siDesc = orden.endswith("DESC")
siPrevio = orden.startswith("CAST")
orden = "CAST(PLIES AS INTEGER)"
if siPrevio:
if siDesc:
orden = ""
else:
orden += " DESC"
elif orden.startswith(clave):
siDesc = orden.endswith("DESC")
if siDesc:
orden = ""
Expand Down
Binary file added Engines/Windows/irina/irina.bin
Binary file not shown.
File renamed without changes.
Binary file modified Engines/Windows/irina/irina.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion Engines/Windows/irina/src/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
LINK_TARGET = irina.exe

OBJS = main.o loop.o board.o data.o util.o movegen.o makemove.o perft.o eval.o evalst.o search.o person.o hash.o
OBJS = main.o loop.o board.o data.o util.o movegen.o makemove.o perft.o eval.o evalst.o search.o person.o hash.o book.o

REBUILDABLES = $(OBJS) $(LINK_TARGET)

Expand Down
577 changes: 577 additions & 0 deletions Engines/Windows/irina/src/book.c

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions Engines/Windows/irina/src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ extern int max_time;

extern bool is_personality;

extern bool use_book;


extern int ST_PAWNPOS_W[64];
extern int ST_KNIGHTPOS_W[64];
Expand Down
18 changes: 16 additions & 2 deletions Engines/Windows/irina/src/loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "protos.h"
#include "globals.h"

#define VERSION "0.12"
#define VERSION "0.13"


void begin(void)
Expand Down Expand Up @@ -53,6 +53,9 @@ void loop(void)
char file[256];
int num;

set_ownbookfile("irina.bin");
set_ownbook(true);

for (;;)
{
if (!fgets(s, 2048, stdin))
Expand All @@ -72,6 +75,8 @@ void loop(void)
printf("option name Personality type combo default Irina var Irina var Steven var Monkey var Donkey var Bull var Wolf var Lion var Rat var Snake var Material var Random var Capture var Advance\n");
printf("option name Min Time type spin default 0 min 0 max 99\n");
printf("option name Max Time type spin default 0 min 0 max 99\n");
printf("option name OwnBook type check default true\n");
printf("option name OwnBookFile type string default irina.bin\n");
printf("uciok\n");
}
else if (SCAN("isready"))
Expand Down Expand Up @@ -108,6 +113,7 @@ void loop(void)
}
else if (SCAN("ucinewgame"))
{
open_book();
continue;
}
else if (SCAN("position"))
Expand All @@ -121,9 +127,9 @@ void loop(void)
else if (SCAN("setoption name"))
{
set_option(s);

}
}
close_book();
}


Expand Down Expand Up @@ -346,6 +352,14 @@ void set_option(char *line)
{
set_hash( value );
}
else if(strcmp(name, "OwnBook") == 0)
{
set_ownbook( strcmp(value, "true") == 0 );
}
else if(strcmp(name, "OwnBookFile") == 0)
{
set_ownbookfile( value );
}
/* setoption name <id> [value <x>]
this is sent to the engine when the user wants to change the internal parameters
of the engine. For the "button" type no value is needed.
Expand Down
25 changes: 13 additions & 12 deletions Engines/Windows/irina/src/person.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int max_time = 0;

bool set_personality(char* value, char* name, int random, int advance,
int capture, int material, int sanity,
int queen, int rook, int bishop, int knight)
int queen, int rook, int bishop, int knight, bool ownbook)
{
if(strcmp(value, name) == 0)
{
Expand All @@ -40,6 +40,7 @@ bool set_personality(char* value, char* name, int random, int advance,
person_rook = rook;
person_bishop = bishop;
person_knight = knight;
set_ownbook(ownbook);
return true;
}
return false;
Expand All @@ -49,17 +50,17 @@ void set_personality_name(char * value)
{
srand(time(NULL));
is_personality = false;
// Rnd Adv Cap Mat San Q R B N
if(set_personality(value, "Monkey", 100, 0, 0, 0, 0, 0, 0, 0, 0)) return;
if(set_personality(value, "Donkey", 50, 30, 10, 10, 0, 1, 1, 1, 1)) return;
if(set_personality(value, "Bull", 40, 40, 5, 15, 0, 2, 1, 1, 1)) return;
if(set_personality(value, "Wolf", 30, 25, 30, 15, 0, 3, 2, 1, 1)) return;
if(set_personality(value, "Lion", 20, 15, 30, 30, 5, 5, 3, 2, 2)) return;
if(set_personality(value, "Rat", 15, 10, 25, 35, 15, 8, 4, 3, 3)) return;
if(set_personality(value, "Snake", 5, 15, 20, 40, 20, 10, 5, 3, 3)) return;
if(set_personality(value, "Random", 100, 0, 0, 0, 0, 0, 0, 0, 0)) return;
if(set_personality(value, "Advance", 0,100, 0, 0, 0, 0, 0, 0, 0)) return;
if(set_personality(value, "Capture", 0, 0,100, 0, 0, 0, 0, 0, 0)) return;
// Rnd Adv Cap Mat San Q R B N book
if(set_personality(value, "Monkey", 100, 0, 0, 0, 0, 0, 0, 0, 0, false)) return;
if(set_personality(value, "Donkey", 50, 30, 10, 10, 0, 1, 1, 1, 1, false)) return;
if(set_personality(value, "Bull", 40, 40, 5, 15, 0, 2, 1, 1, 1, false)) return;
if(set_personality(value, "Wolf", 30, 25, 30, 15, 0, 3, 2, 1, 1, false)) return;
if(set_personality(value, "Lion", 20, 15, 30, 30, 5, 5, 3, 2, 2, false)) return;
if(set_personality(value, "Rat", 15, 10, 25, 35, 15, 8, 4, 3, 3, true)) return;
if(set_personality(value, "Snake", 5, 15, 20, 40, 20, 10, 5, 3, 3, true)) return;
if(set_personality(value, "Random", 100, 0, 0, 0, 0, 0, 0, 0, 0, false)) return;
if(set_personality(value, "Advance", 0,100, 0, 0, 0, 0, 0, 0, 0, false)) return;
if(set_personality(value, "Capture", 0, 0,100, 0, 0, 0, 0, 0, 0, false)) return;

if(!strcmp(value, "Material"))
{
Expand Down
8 changes: 8 additions & 0 deletions Engines/Windows/irina/src/protos.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,12 @@ void time_test( Bitmap mstime );
void init_data_steven(void);
int eval_steven(void);

// book.c
bool using_book(void);
void set_ownbook( bool ok );
void set_ownbookfile( char * name );
void close_book( void );
void open_book();
bool check_book( char * fen, char * move );

#endif
69 changes: 45 additions & 24 deletions Engines/Windows/irina/src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,21 @@ void play_irina(int depth, int time)
char str_move[20];
char bestmove[6], ponder[6];
Bitmap ms;
char fen[100];

if( using_book() )
{
board_fen(fen);
if( check_book(fen, bestmove) )
{
printf("bestmove %s\n", bestmove);
return;
}
else
{
close_book();
}
}

ok_time_kb = true;
time_ini = get_ms();
Expand Down Expand Up @@ -165,11 +180,40 @@ int noMovesScore(int ply)
return DRAWSCORE;
}

inline void test_time()
{
Bitmap ms;
if (--xxx == 0)
{
ms = get_ms();
if ((time_end && (time_end < ms)) || bioskey())
{
ok_time_kb = false;
}
xxx = TEST_KEY_TIME;

if (ms - time_last > MSG_INTERVAL)
{
time_last = ms;
ms -= time_ini;
if (ms)
{
printf("info depth %d time %lu nodes %lu nps %lu\n",
working_depth,
(long unsigned int) ms, (long unsigned int) inodes,
(long unsigned int) (inodes * 1000 / ms));
}
}
}
}

int quiescence(int alpha, int beta, int ply, int max_ply)
{
int k, j;
int score;

test_time();

if (inCheck()) {
return alphaBeta(alpha, beta, 1, ply, max_ply);
}
Expand Down Expand Up @@ -219,32 +263,9 @@ int alphaBeta(int alpha, int beta, int depth, int ply, int max_ply)
int score, best_score;
int desde, hasta;
unsigned k, j;
Bitmap ms;
Move move;

if (--xxx == 0)
{
ms = get_ms();
if ((time_end && (time_end < ms)) || bioskey())
{
ok_time_kb = false;
}
xxx = TEST_KEY_TIME;

if (ms - time_last > MSG_INTERVAL)
{
time_last = ms;
ms -= time_ini;
if (ms)
{
printf("info depth %d time %lu nodes %lu nps %lu\n",
working_depth,
(long unsigned int) ms, (long unsigned int) inodes,
(long unsigned int) (inodes * 1000 / ms));
}
}
}

test_time();

if (depth == 0)
{
Expand Down
5 changes: 5 additions & 0 deletions Engines/Windows/irina/src/xmk_book.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@echo off
call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;D:\Program Files\LLVM\bin;%PATH%
clang -O2 -DWIN32 -D_CRT_SECURE_NO_WARNINGS book.c -o b.exe
b
3 changes: 2 additions & 1 deletion Engines/Windows/irina/src/xmk_clang.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@echo off
call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;D:\Program Files\LLVM\bin;%PATH%
clang -O2 -DWIN32 -D_CRT_SECURE_NO_WARNINGS main.c loop.c board.c data.c util.c movegen.c makemove.c perft.c eval.c evalst.c search.c person.c hash.c -o irina_clang.exe
clang -O2 -DWIN32 -D_CRT_SECURE_NO_WARNINGS main.c loop.c board.c data.c util.c movegen.c makemove.c perft.c eval.c evalst.c search.c person.c hash.c book.c -o ..\irina.exe
strip ..\irina.exe
Binary file modified Locale/br/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file modified Locale/es/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file modified Locale/fr/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file modified Locale/it/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file modified Locale/pl/LC_MESSAGES/lucaschess.mo
Binary file not shown.
1 change: 0 additions & 1 deletion Lucas.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@




reload(sys)
sys.setdefaultencoding("latin-1")
sys.path.insert(0, os.curdir)
Expand Down
2 changes: 1 addition & 1 deletion bug.log
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Version 10.10.2
Version 10.10.3

0 comments on commit 31ee39a

Please sign in to comment.