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

Commit 31ee39a

Browse files
committed
Version 10.10.3
1 parent 18fb696 commit 31ee39a

25 files changed

+696
-60
lines changed

Code/ControlPGN.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -158,10 +158,10 @@ def actual(self):
158158
rival = self.gestor.libro.nombre
159159
elif tipoJuego in (kJugFics, kJugFide):
160160
rival = self.gestor.nombreObj
161-
elif self.gestor.xrival:
162-
rival = self.gestor.xrival.nombre
163-
else:
164-
rival = "";
161+
elif self.gestor.xrival: # foncap change
162+
rival = self.gestor.xrival.nombre # foncap change
163+
else: # foncap change
164+
rival = "" # foncap change
165165

166166
jugador = self.gestor.configuracion.jugador
167167
resultado = self.gestor.resultado

Code/EnginesWindows.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ def mas(cm):
6565

6666
cm = ConfigMotor("gaia", "Jean-Francois Romang, David Rabel", "3.5", "http://gaiachess.free.fr")
6767
cm.path = "gaia32.exe"
68+
cm.nombre = "Gaïa 3.5".decode("utf-8")
6869
cm.elo = 2378
6970
cm.ordenUCI("Ponder", "false")
7071
mas(cm)
@@ -140,6 +141,8 @@ def mas(cm):
140141
cm.elo = 2720
141142
cm.ordenUCI("Hash", "32")
142143
cm.ordenUCI("Ponder", "false")
144+
cm.nombre = "Gödel 3.4.9".decode("utf-8")
145+
143146
mas(cm)
144147

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

258-
cm = ConfigMotor("irina", "Lucas Monge", "0.12", "")
261+
cm = ConfigMotor("irina", "Lucas Monge", "0.13", "")
259262
cm.path = "irina.exe"
260263
cm.elo = 1200
261264
mas(cm)

Code/Init.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DEBUG = False
2-
VERSION = "10.10.2"
2+
VERSION = "10.10.3"
33

44
import os
55
import sys

Code/QT/Histogram.py

+6-11
Original file line numberDiff line numberDiff line change
@@ -337,8 +337,9 @@ def drawBackground(self, painter, rect):
337337
pen.setWidth(2)
338338
pen.setColor(QtGui.QColor("#DE5044"))
339339
painter.setPen(pen)
340-
p = self.hserie.liPoints[self.pointActive]
341-
painter.drawLine(p.rx, bottom, p.rx, top)
340+
if 0 <= self.pointActive < len(self.hserie.liPoints):
341+
p = self.hserie.liPoints[self.pointActive]
342+
painter.drawLine(p.rx, bottom, p.rx, top)
342343

343344
def mousePressEvent(self, event):
344345
super(Histogram, self).mousePressEvent(event)
@@ -430,15 +431,9 @@ def genHistograms(partida, sicentipawns):
430431
alm.lijgW = lijgW
431432
alm.lijgB = lijgB
432433

433-
alm.porcT = porcT*1.0/len(lijg)
434-
if len(lijgW) != 0:
435-
alm.porcW = porcW*1.0/len(lijgW)
436-
else:
437-
alm.porcW = 0;
438-
if len(lijgB) != 0:
439-
alm.porcB = porcB*1.0/len(lijgB)
440-
else:
441-
alm.porcB = 0;
434+
alm.porcT = porcT*1.0/len(lijg) if len(lijg) else 0
435+
alm.porcW = porcW*1.0/len(lijgW) if len(lijgW) else 0
436+
alm.porcB = porcB*1.0/len(lijgB) if len(lijgB) else 0
442437

443438
return alm
444439

Code/QT/PantallaManualSave.py

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from Code import ControlPosicion
77
from Code import XVoyager
88
from Code import Partida
9+
910
from Code.QT import Colocacion
1011
from Code.QT import Controles
1112
from Code.QT import Iconos

Code/QT/PantallaPGN.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,16 @@ def gridDobleClick(self, grid, fila, oColumna):
193193
def gridDobleClickCabecera(self, grid, oColumna):
194194
clave = oColumna.clave
195195
orden = self.dbf.orden
196-
if orden.startswith(clave):
196+
if clave == "PLIES":
197+
siDesc = orden.endswith("DESC")
198+
siPrevio = orden.startswith("CAST")
199+
orden = "CAST(PLIES AS INTEGER)"
200+
if siPrevio:
201+
if siDesc:
202+
orden = ""
203+
else:
204+
orden += " DESC"
205+
elif orden.startswith(clave):
197206
siDesc = orden.endswith("DESC")
198207
if siDesc:
199208
orden = ""

Engines/Windows/irina/irina.bin

655 KB
Binary file not shown.
File renamed without changes.

Engines/Windows/irina/irina.exe

11.5 KB
Binary file not shown.

Engines/Windows/irina/src/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
LINK_TARGET = irina.exe
22

3-
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
3+
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
44

55
REBUILDABLES = $(OBJS) $(LINK_TARGET)
66

Engines/Windows/irina/src/book.c

+577
Large diffs are not rendered by default.

Engines/Windows/irina/src/globals.h

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ extern int max_time;
9898

9999
extern bool is_personality;
100100

101+
extern bool use_book;
102+
101103

102104
extern int ST_PAWNPOS_W[64];
103105
extern int ST_KNIGHTPOS_W[64];

Engines/Windows/irina/src/loop.c

+16-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "protos.h"
1313
#include "globals.h"
1414

15-
#define VERSION "0.12"
15+
#define VERSION "0.13"
1616

1717

1818
void begin(void)
@@ -53,6 +53,9 @@ void loop(void)
5353
char file[256];
5454
int num;
5555

56+
set_ownbookfile("irina.bin");
57+
set_ownbook(true);
58+
5659
for (;;)
5760
{
5861
if (!fgets(s, 2048, stdin))
@@ -72,6 +75,8 @@ void loop(void)
7275
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");
7376
printf("option name Min Time type spin default 0 min 0 max 99\n");
7477
printf("option name Max Time type spin default 0 min 0 max 99\n");
78+
printf("option name OwnBook type check default true\n");
79+
printf("option name OwnBookFile type string default irina.bin\n");
7580
printf("uciok\n");
7681
}
7782
else if (SCAN("isready"))
@@ -108,6 +113,7 @@ void loop(void)
108113
}
109114
else if (SCAN("ucinewgame"))
110115
{
116+
open_book();
111117
continue;
112118
}
113119
else if (SCAN("position"))
@@ -121,9 +127,9 @@ void loop(void)
121127
else if (SCAN("setoption name"))
122128
{
123129
set_option(s);
124-
125130
}
126131
}
132+
close_book();
127133
}
128134

129135

@@ -346,6 +352,14 @@ void set_option(char *line)
346352
{
347353
set_hash( value );
348354
}
355+
else if(strcmp(name, "OwnBook") == 0)
356+
{
357+
set_ownbook( strcmp(value, "true") == 0 );
358+
}
359+
else if(strcmp(name, "OwnBookFile") == 0)
360+
{
361+
set_ownbookfile( value );
362+
}
349363
/* setoption name <id> [value <x>]
350364
this is sent to the engine when the user wants to change the internal parameters
351365
of the engine. For the "button" type no value is needed.

Engines/Windows/irina/src/person.c

+13-12
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int max_time = 0;
2626

2727
bool set_personality(char* value, char* name, int random, int advance,
2828
int capture, int material, int sanity,
29-
int queen, int rook, int bishop, int knight)
29+
int queen, int rook, int bishop, int knight, bool ownbook)
3030
{
3131
if(strcmp(value, name) == 0)
3232
{
@@ -40,6 +40,7 @@ bool set_personality(char* value, char* name, int random, int advance,
4040
person_rook = rook;
4141
person_bishop = bishop;
4242
person_knight = knight;
43+
set_ownbook(ownbook);
4344
return true;
4445
}
4546
return false;
@@ -49,17 +50,17 @@ void set_personality_name(char * value)
4950
{
5051
srand(time(NULL));
5152
is_personality = false;
52-
// Rnd Adv Cap Mat San Q R B N
53-
if(set_personality(value, "Monkey", 100, 0, 0, 0, 0, 0, 0, 0, 0)) return;
54-
if(set_personality(value, "Donkey", 50, 30, 10, 10, 0, 1, 1, 1, 1)) return;
55-
if(set_personality(value, "Bull", 40, 40, 5, 15, 0, 2, 1, 1, 1)) return;
56-
if(set_personality(value, "Wolf", 30, 25, 30, 15, 0, 3, 2, 1, 1)) return;
57-
if(set_personality(value, "Lion", 20, 15, 30, 30, 5, 5, 3, 2, 2)) return;
58-
if(set_personality(value, "Rat", 15, 10, 25, 35, 15, 8, 4, 3, 3)) return;
59-
if(set_personality(value, "Snake", 5, 15, 20, 40, 20, 10, 5, 3, 3)) return;
60-
if(set_personality(value, "Random", 100, 0, 0, 0, 0, 0, 0, 0, 0)) return;
61-
if(set_personality(value, "Advance", 0,100, 0, 0, 0, 0, 0, 0, 0)) return;
62-
if(set_personality(value, "Capture", 0, 0,100, 0, 0, 0, 0, 0, 0)) return;
53+
// Rnd Adv Cap Mat San Q R B N book
54+
if(set_personality(value, "Monkey", 100, 0, 0, 0, 0, 0, 0, 0, 0, false)) return;
55+
if(set_personality(value, "Donkey", 50, 30, 10, 10, 0, 1, 1, 1, 1, false)) return;
56+
if(set_personality(value, "Bull", 40, 40, 5, 15, 0, 2, 1, 1, 1, false)) return;
57+
if(set_personality(value, "Wolf", 30, 25, 30, 15, 0, 3, 2, 1, 1, false)) return;
58+
if(set_personality(value, "Lion", 20, 15, 30, 30, 5, 5, 3, 2, 2, false)) return;
59+
if(set_personality(value, "Rat", 15, 10, 25, 35, 15, 8, 4, 3, 3, true)) return;
60+
if(set_personality(value, "Snake", 5, 15, 20, 40, 20, 10, 5, 3, 3, true)) return;
61+
if(set_personality(value, "Random", 100, 0, 0, 0, 0, 0, 0, 0, 0, false)) return;
62+
if(set_personality(value, "Advance", 0,100, 0, 0, 0, 0, 0, 0, 0, false)) return;
63+
if(set_personality(value, "Capture", 0, 0,100, 0, 0, 0, 0, 0, 0, false)) return;
6364

6465
if(!strcmp(value, "Material"))
6566
{

Engines/Windows/irina/src/protos.h

+8
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,12 @@ void time_test( Bitmap mstime );
8484
void init_data_steven(void);
8585
int eval_steven(void);
8686

87+
// book.c
88+
bool using_book(void);
89+
void set_ownbook( bool ok );
90+
void set_ownbookfile( char * name );
91+
void close_book( void );
92+
void open_book();
93+
bool check_book( char * fen, char * move );
94+
8795
#endif

Engines/Windows/irina/src/search.c

+45-24
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ void play_irina(int depth, int time)
6868
char str_move[20];
6969
char bestmove[6], ponder[6];
7070
Bitmap ms;
71+
char fen[100];
72+
73+
if( using_book() )
74+
{
75+
board_fen(fen);
76+
if( check_book(fen, bestmove) )
77+
{
78+
printf("bestmove %s\n", bestmove);
79+
return;
80+
}
81+
else
82+
{
83+
close_book();
84+
}
85+
}
7186

7287
ok_time_kb = true;
7388
time_ini = get_ms();
@@ -165,11 +180,40 @@ int noMovesScore(int ply)
165180
return DRAWSCORE;
166181
}
167182

183+
inline void test_time()
184+
{
185+
Bitmap ms;
186+
if (--xxx == 0)
187+
{
188+
ms = get_ms();
189+
if ((time_end && (time_end < ms)) || bioskey())
190+
{
191+
ok_time_kb = false;
192+
}
193+
xxx = TEST_KEY_TIME;
194+
195+
if (ms - time_last > MSG_INTERVAL)
196+
{
197+
time_last = ms;
198+
ms -= time_ini;
199+
if (ms)
200+
{
201+
printf("info depth %d time %lu nodes %lu nps %lu\n",
202+
working_depth,
203+
(long unsigned int) ms, (long unsigned int) inodes,
204+
(long unsigned int) (inodes * 1000 / ms));
205+
}
206+
}
207+
}
208+
}
209+
168210
int quiescence(int alpha, int beta, int ply, int max_ply)
169211
{
170212
int k, j;
171213
int score;
172214

215+
test_time();
216+
173217
if (inCheck()) {
174218
return alphaBeta(alpha, beta, 1, ply, max_ply);
175219
}
@@ -219,32 +263,9 @@ int alphaBeta(int alpha, int beta, int depth, int ply, int max_ply)
219263
int score, best_score;
220264
int desde, hasta;
221265
unsigned k, j;
222-
Bitmap ms;
223266
Move move;
224267

225-
if (--xxx == 0)
226-
{
227-
ms = get_ms();
228-
if ((time_end && (time_end < ms)) || bioskey())
229-
{
230-
ok_time_kb = false;
231-
}
232-
xxx = TEST_KEY_TIME;
233-
234-
if (ms - time_last > MSG_INTERVAL)
235-
{
236-
time_last = ms;
237-
ms -= time_ini;
238-
if (ms)
239-
{
240-
printf("info depth %d time %lu nodes %lu nps %lu\n",
241-
working_depth,
242-
(long unsigned int) ms, (long unsigned int) inodes,
243-
(long unsigned int) (inodes * 1000 / ms));
244-
}
245-
}
246-
}
247-
268+
test_time();
248269

249270
if (depth == 0)
250271
{
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
@echo off
2+
call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
3+
PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;D:\Program Files\LLVM\bin;%PATH%
4+
clang -O2 -DWIN32 -D_CRT_SECURE_NO_WARNINGS book.c -o b.exe
5+
b
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
@echo off
22
call "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat"
33
PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;D:\Program Files\LLVM\bin;%PATH%
4-
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
4+
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
5+
strip ..\irina.exe

Locale/br/LC_MESSAGES/lucaschess.mo

2.92 KB
Binary file not shown.

Locale/es/LC_MESSAGES/lucaschess.mo

-1 Bytes
Binary file not shown.

Locale/fr/LC_MESSAGES/lucaschess.mo

21 Bytes
Binary file not shown.

Locale/it/LC_MESSAGES/lucaschess.mo

2.94 KB
Binary file not shown.

Locale/pl/LC_MESSAGES/lucaschess.mo

1.3 KB
Binary file not shown.

Lucas.py

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515

1616

17-
1817
reload(sys)
1918
sys.setdefaultencoding("latin-1")
2019
sys.path.insert(0, os.curdir)

bug.log

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Version 10.10.2
1+
Version 10.10.3

0 commit comments

Comments
 (0)