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

Commit abcd8af

Browse files
committed
Version 10.09
1 parent d44f3a5 commit abcd8af

File tree

437 files changed

+26294
-12081
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

437 files changed

+26294
-12081
lines changed

Code/Albums.pyc

17.3 KB
Binary file not shown.

Code/Analisis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -660,7 +660,7 @@ def grabarBase(self, partida, rm, siTodos=True):
660660
nombre = self.etiquetaMotor()
661661
tiempo = self.etiquetaTiempo()
662662
comentario = " {%s %s %s} " % (rm.abrTexto(), nombre, tiempo)
663-
jugada = partida.pgnBaseRAW(self.mAnalisis.posJugada / 2 + 1)
663+
jugada = partida.pgnBaseRAW(self.jg.posicionBase.jugadas)
664664
li = jugada.split(" ")
665665
n = 1 if siW else 2
666666
if siTodos:

Code/Analisis.pyc

28.7 KB
Binary file not shown.

Code/AnalisisIndexes.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ def get_gamestage(cp, mrm):
249249
def tp_gamestage(cp, mrm):
250250
return _("Game stage"), calc_gamestage(cp, mrm), get_gamestage(cp, mrm)
251251

252-
def genIndexes(partida):
252+
def genIndexes(partida, alm):
253253
average = {True: 0, False: 0}
254254
domination = {True: 0, False: 0}
255255
complexity = {True: 0.0, False: 0.0}
@@ -312,6 +312,7 @@ def genIndexes(partida):
312312
ct = _("Total")
313313
cpt = " " + _("pts")
314314
xac = txt_levels
315+
prc = "%"
315316

316317
inicio = '<tr><td align="center">%s</td>'
317318
resto = '<td align="center">%s</td><td align="center">%s</td><td align="center">%s</td></tr>'
@@ -328,6 +329,7 @@ def genIndexes(partida):
328329
txt += plantillaC % (_("Narrowness"), xac(narrowness[True]), xac(narrowness[False]), xac(narrownessT))
329330
txt += plantillaC % (_("Pieces activity"), xac(piecesactivity[True]), xac(piecesactivity[False]), xac(piecesactivityT))
330331
txt += plantillaC % (_("Exchange tendency"), xac(exchangetendency[True]), xac(exchangetendency[False]), xac(exchangetendencyT))
332+
txt += plantillaL % ( "%", alm.porcW, prc, alm.porcB, prc, alm.porcT, prc)
331333

332334
txtHTML = '<table border="1" cellpadding="5" cellspacing="1" >%s%s</table>' % (cab, txt)
333335
# Analisis.csv_formula(partida)

Code/AnalisisIndexes.pyc

12.1 KB
Binary file not shown.

Code/Apertura.pyc

4.42 KB
Binary file not shown.

Code/AperturasStd.pyc

5.69 KB
Binary file not shown.

Code/BMT.pyc

6.5 KB
Binary file not shown.

Code/BaseConfig.pyc

30.9 KB
Binary file not shown.

Code/BookGuide.pyc

29 KB
Binary file not shown.

Code/Books.pyc

35.2 KB
Binary file not shown.

Code/CPU.pyc

4.07 KB
Binary file not shown.

Code/CajonDesastre.py

-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ def dicDisk(configuracion):
7979
dicDisk_SQL(backup, configuracion.fichEstadFicsElo, tabla="color")
8080
dicDisk_SQL(backup, configuracion.fichEstadFideElo, tabla="color")
8181
dicDisk_SQL(backup, configuracion.fichEstadMicElo, tabla="color")
82-
dicDisk_SQL(backup, configuracion.carpeta + "/*.xfcc", tabla="config")
8382
dicDisk_SQL(backup, configuracion.ficheroMate, siAllTables=True)
8483

8584
# Cache

Code/CajonDesastre.pyc

16.2 KB
Binary file not shown.

Code/Configuracion.pyc

25.7 KB
Binary file not shown.

Code/Constantes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
kSigueApertura, kSigueUsuario, kMalApertura = range(3)
44

55
kJugNueva, kJugEntPos, kJugPGN, kJugEntMaq, kJugGM, kJugRemoto, kJugSolo, kJug60, kJugElo, kJugMicElo, \
6-
kJugBooks, kJugAperturas, kJugBoxing, kJugEntTac, kJugMvM, kJugAlbum, kJugFics, kJugFide, kJugXFCC, \
7-
kJugWorldMap, kJugRoute, kJugEntLight, kJugWashingCreate, kJugWashingTactics, kJugWashingReplay = range(25)
6+
kJugBooks, kJugAperturas, kJugBoxing, kJugEntTac, kJugMvM, kJugAlbum, kJugFics, kJugFide, \
7+
kJugWorldMap, kJugRoute, kJugEntLight, kJugWashingCreate, kJugWashingTactics, kJugWashingReplay = range(24)
88

99
kFinNormal, kFinReinicio = range(2)
1010

Code/Constantes.pyc

4.01 KB
Binary file not shown.

Code/ControlPGN.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def actual(self):
149149

150150
if tipoJuego == kJugGM:
151151
return self.actualGM()
152-
elif tipoJuego in (kJugPGN, kJugSolo, kJugXFCC, kJugRoute):
152+
elif tipoJuego in (kJugPGN, kJugSolo, kJugRoute):
153153
return self.gestor.actualPGN()
154154

155155
if tipoJuego == kJugRemoto:

Code/ControlPGN.pyc

7.49 KB
Binary file not shown.

Code/ControlPosicion.pyc

11.5 KB
Binary file not shown.

Code/DBgames.py

+60-57
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ def rootGames(self):
299299
alm = self.root()
300300
return alm.W + alm.B + alm.D + alm.O
301301

302-
def children(self, pvBase):
302+
def children(self, pvBase, allmoves=True):
303303
fen_base = makePV(pvBase)
304304
li = getExMoves()
305305
liResp = []
@@ -311,6 +311,8 @@ def children(self, pvBase):
311311
fen = getFen()
312312
hashFen = self._fen2hash(fen)
313313
alm = self._readRowExt(rfather, hashFen, fen)
314+
if not allmoves and (alm.W +alm.B+alm.D+alm.O) == 0:
315+
continue
314316
alm.move = move
315317
liResp.append(alm)
316318
return liResp
@@ -452,11 +454,14 @@ def siFaltanRegistrosPorLeer(self):
452454

453455
def filterPV(self, pv, condicionAdicional=None):
454456
if type(pv) == list: # transpositions
455-
li = []
456-
for unpv in pv:
457-
xpv = pv2xpv(unpv)
458-
li.append('XPV GLOB "%s*"' % xpv)
459-
condicion = "(%s)" % (" OR ".join(li),)
457+
if pv:
458+
li = []
459+
for unpv in pv:
460+
xpv = pv2xpv(unpv)
461+
li.append('XPV GLOB "%s*"' % xpv)
462+
condicion = "(%s)" % (" OR ".join(li),)
463+
else:
464+
condicion = ""
460465
else:
461466
xpv = pv2xpv(pv)
462467
condicion = 'XPV GLOB "%s*"' % xpv if xpv else ""
@@ -554,68 +559,46 @@ def borrarLista(self, lista):
554559
del self.liRowids[recno]
555560
self._conexion.commit()
556561

557-
def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN):
562+
def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN, allmoves=True):
558563
liMoves = []
559564
siBlancas = pvBase.count(" ") % 2 == 1 if pvBase else True
560565

561-
if pvBase is None:
562-
root = self.dbSTAT.root()
563-
w, d, b, o = root.W, root.D, root.B, root.O
564-
tt = w + d + b + o
566+
liChildren = self.dbSTAT.children(pvBase, allmoves)
567+
568+
tt = 0
569+
570+
lipvmove = []
571+
for alm in liChildren:
572+
w, d, b, o = alm.W, alm.D, alm.B, alm.O
573+
t = w + d + b + o
574+
# if t == 0:
575+
# continue
576+
565577
dic = {}
578+
pvmove = alm.move
579+
pv = pvBase + " " + pvmove
580+
pv = pv.strip()
581+
lipvmove.append(pvmove)
566582
dic["numero"] = ""
567-
dic["pvmove"] = ""
568-
dic["pv"] = ""
569-
dic["analisis"] = None
570-
dic["games"] = tt
583+
dic["pvmove"] = pvmove
584+
dic["pv"] = pv
585+
dic["analisis"] = dicAnalisis.get(pvmove, None)
586+
dic["games"] = t
587+
tt += t
571588
dic["white"] = w
572589
dic["draw"] = d
573590
dic["black"] = b
574591
dic["other"] = o
575-
dic["pwhite"] = w * 100.0 / tt if tt else 0.0
576-
dic["pdraw"] = d * 100.0 / tt if tt else 0.0
577-
dic["pblack"] = b * 100.0 / tt if tt else 0.0
578-
dic["pother"] = o * 100.0 / tt if tt else 0.0
579-
dic["move"] = _("Total")
580-
dic["alm"] = None
581-
liMoves.append(dic)
592+
dic["pwhite"] = w * 100.0 / t if t else 0.0
593+
dic["pdraw"] = d * 100.0 / t if t else 0.0
594+
dic["pblack"] = b * 100.0 / t if t else 0.0
595+
dic["pother"] = o * 100.0 / t if t else 0.0
582596

583-
else:
584-
liChildren = self.dbSTAT.children(pvBase)
597+
dic["alm"] = alm
585598

586-
tt = 0
587-
588-
lipvmove = []
589-
for alm in liChildren:
590-
w, d, b, o = alm.W, alm.D, alm.B, alm.O
591-
t = w + d + b + o
592-
# if t == 0:
593-
# continue
594-
595-
dic = {}
596-
pvmove = alm.move
597-
pv = pvBase + " " + pvmove
598-
pv = pv.strip()
599-
lipvmove.append(pvmove)
600-
dic["numero"] = ""
601-
dic["pvmove"] = pvmove
602-
dic["pv"] = pv
603-
dic["analisis"] = dicAnalisis.get(pvmove, None)
604-
dic["games"] = t
605-
tt += t
606-
dic["white"] = w
607-
dic["draw"] = d
608-
dic["black"] = b
609-
dic["other"] = o
610-
dic["pwhite"] = w * 100.0 / t if t else 0.0
611-
dic["pdraw"] = d * 100.0 / t if t else 0.0
612-
dic["pblack"] = b * 100.0 / t if t else 0.0
613-
dic["pother"] = o * 100.0 / t if t else 0.0
614-
615-
dic["alm"] = alm
616-
617-
liMoves.append(dic)
599+
liMoves.append(dic)
618600

601+
if allmoves:
619602
for pvmove in dicAnalisis:
620603
if pvmove not in lipvmove:
621604
dic = {}
@@ -637,8 +620,9 @@ def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN):
637620

638621
liMoves.append(dic)
639622

640-
liMoves = sorted(liMoves, key=lambda dic: -dic["games"])
623+
liMoves = sorted(liMoves, key=lambda dic: -dic["games"])
641624

625+
tg = w = d = l = 0
642626
for dic in liMoves:
643627
dic["pgames"] = dic["games"] * 100.0 / tt if tt else 0.0
644628
dic["pdrawwhite"] = dic["pwhite"] + dic["pdraw"]
@@ -658,6 +642,13 @@ def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN):
658642
dic["plost"] = dic["pwhite"]
659643
dic["pwin"] = dic["pblack"]
660644

645+
g = dic["games"]
646+
tg += g
647+
w += dic["win"]
648+
l += dic["lost"]
649+
d += dic["draw"]
650+
651+
661652
pvmove = dic["pvmove"]
662653
if pvmove:
663654
pv = dic["pv"]
@@ -676,6 +667,18 @@ def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN):
676667
dic["move"] = pvmove
677668
dic["partida"] = p
678669

670+
dic = {}
671+
dic["games"] = tg
672+
dic["win"] = w
673+
dic["draw"] = d
674+
dic["lost"] = l
675+
dic["pwin"] = w*100.0/tg if tg else 0.0
676+
dic["pdraw"] = d*100.0/tg if tg else 0.0
677+
dic["plost"] = l*100.0/tg if tg else 0.0
678+
dic["pdrawwin"] = (w+d)*100.0/tg if tg else 0.0
679+
dic["pdrawlost"] = (l+d)*100.0/tg if tg else 0.0
680+
liMoves.append(dic)
681+
679682
return liMoves
680683

681684
def recrearSTAT(self, dispatch, depth):

Code/DBgames.pyc

29.8 KB
Binary file not shown.

Code/DGT.pyc

7.36 KB
Binary file not shown.

Code/EnginesLinux.py

+17-4
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,19 @@ def mas(cm):
3636

3737
cm = ConfigMotor("komodo", "Don Dailey, Larry Kaufman", "5r1 32-bit", "http://komodochess.com/")
3838
cm.path = "Linux/komodo-5r1-32bit"
39+
cm.path_64 = "Linux/komodo-8-linux-generic", "8 64bits"
3940
cm.ordenUCI("Ponder", "false")
4041
cm.ordenUCI("Hash", "32")
4142
cm.elo = 3053
4243
cm.ponMultiPV(20, 99)
4344
mas(cm)
4445

45-
cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "3", "http://stockfishchess.org/")
46-
cm.path = "Linux/stockfish-3-32-ja"
47-
cm.elo = 3079
46+
cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "8 32bits", "http://stockfishchess.org/")
47+
cm.path = "Linux/stockfish_8_x32_old"
48+
cm.path_64 = "Linux/stockfish_8_x64", "8 64bits"
49+
cm.elo = 3300
4850
cm.ordenUCI("Ponder", "false")
49-
cm.ordenUCI("Hash", "32")
51+
cm.ordenUCI("Hash", "64")
5052
cm.ordenUCI("Threads", "1")
5153
cm.ponMultiPV(20, 500)
5254
mas(cm)
@@ -147,6 +149,17 @@ def mas(cm):
147149
cm.elo = 2900
148150
mas(cm)
149151

152+
cm = ConfigMotor("irina", "Lucas Monge", "0.12", "")
153+
cm.path = "irina"
154+
cm.elo = 1200
155+
mas(cm)
156+
157+
cm = ConfigMotor("rodentII", "Pawel Koziol", "0.9.64", "http://www.pkoziol.cal24.pl/rodent/rodent.htm")
158+
cm.path = "RodentII_x32"
159+
cm.elo = 2912
160+
cm.ordenUCI("Hash", "64")
161+
mas(cm)
162+
150163
return dicRivales
151164

152165
def dicMotoresFixedElo():

Code/EnginesMicElo.pyc

1.39 KB
Binary file not shown.

Code/EnginesWindows.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# -*- coding: utf-8 -*-
1+
# -*- coding: latin-1 -*-
22

33
import collections
44

@@ -149,7 +149,7 @@ def mas(cm):
149149
cm.ponMultiPV(1, 4)
150150
mas(cm)
151151

152-
cm = ConfigMotor("cheng", "Martin Sedlák", "4 0.39", "http://www.vlasak.biz/cheng")
152+
cm = ConfigMotor("cheng", "Martin Sedlák", "4 0.39", "http://www.vlasak.biz/cheng")
153153
cm.path = "cheng4.exe"
154154
cm.elo = 2750
155155
cm.ponMultiPV(20, 256)
@@ -219,7 +219,7 @@ def mas(cm):
219219
cm.ponMultiPV(20, 100)
220220
mas(cm)
221221

222-
cm = ConfigMotor("texel", "Peter Österlund", "1.05 32bit", "http://web.comhem.se/petero2home/javachess/index.html#texel")
222+
cm = ConfigMotor("texel", "Peter Österlund", "1.05 32bit", "http://web.comhem.se/petero2home/javachess/index.html#texel")
223223
cm.path = "texel32old.exe"
224224
cm.elo = 3100
225225
cm.ordenUCI("Hash", "32")
@@ -260,10 +260,10 @@ def mas(cm):
260260
cm.elo = 1200
261261
mas(cm)
262262

263-
cm = ConfigMotor("rodentII", "Pawel Koziol", "0.9.3", "http://www.pkoziol.cal24.pl/rodent/rodent.htm")
264-
cm.path = "rodentII_x32.exe"
265-
cm.path_64 = "rodentII_x64.exe", "0.9.3 64bit"
266-
cm.elo = 2866
263+
cm = ConfigMotor("rodentII", "Pawel Koziol", "0.9.64", "http://www.pkoziol.cal24.pl/rodent/rodent.htm")
264+
cm.path = "RodentII_x32.exe"
265+
cm.path_64 = "RodentII_x64.exe", "0.9.64 64bit"
266+
cm.elo = 2912
267267
cm.ordenUCI("Hash", "64")
268268
mas(cm)
269269

Code/EnginesWindows.pyc

9.43 KB
Binary file not shown.

Code/Entrenamientos.pyc

22.8 KB
Binary file not shown.

Code/Everest.pyc

26.4 KB
Binary file not shown.

Code/GM.pyc

11.5 KB
Binary file not shown.

Code/Gestor.py

+10-13
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ def __init__(self, procesador):
5252
self.ayudas = None
5353
self.ayudasPGN = 0
5454

55+
self.siCompetitivo = False
56+
5557
self.resultado = kDesconocido
5658

5759
self.categoria = None
@@ -145,16 +147,14 @@ def otherCandidates(self, liMoves, posicion, liC):
145147
liPlayer.append((mov.hasta(), "P+"))
146148
elif mov.captura():
147149
liPlayer.append((mov.hasta(), "Px"))
148-
fen = posicion.fen()
149-
if "w" in fen:
150-
fen = fen.replace(" w ", " b ")
151-
else:
152-
fen = fen.replace(" b ", " w ")
150+
oposic = posicion.copia()
151+
oposic.siBlancas = not posicion.siBlancas
152+
oposic.alPaso = ""
153153
siJaque = LCEngine.isCheck()
154-
LCEngine.setFen(fen)
154+
LCEngine.setFen(oposic.fen())
155155
liO = LCEngine.getExMoves()
156156
liRival = []
157-
for mov in liO:
157+
for n, mov in enumerate(liO):
158158
if not siJaque:
159159
if mov.mate():
160160
liRival.append((mov.hasta(), "R#"))
@@ -443,9 +443,7 @@ def ponVista(self):
443443

444444
def siMiraKibitzers(self):
445445
return (self.estado == kFinJuego) or \
446-
self.tipoJuego in (
447-
kJugEntPos, kJugPGN, kJugEntMaq, kJugEntTac, kJugGM, kJugSolo, kJugBooks, kJugAperturas,
448-
kJugXFCC) or \
446+
self.tipoJuego in (kJugEntPos, kJugPGN, kJugEntMaq, kJugEntTac, kJugGM, kJugSolo, kJugBooks, kJugAperturas) or \
449447
(self.tipoJuego in (kJugElo, kJugMicElo) and not self.siCompetitivo)
450448

451449
def miraKibitzers(self, jg, columnaClave):
@@ -890,8 +888,7 @@ def analizaPosicion(self, fila, clave):
890888
if self.estado == kFinJuego:
891889
maxRecursion = 9999
892890
else:
893-
if not (self.tipoJuego in [kJugEntPos, kJugPGN, kJugEntMaq, kJugGM, kJugSolo, kJugBooks, kJugAperturas,
894-
kJugEntTac, kJugXFCC] or
891+
if not (self.tipoJuego in [kJugEntPos, kJugPGN, kJugEntMaq, kJugGM, kJugSolo, kJugBooks, kJugAperturas, kJugEntTac] or
895892
(self.tipoJuego in [kJugElo, kJugMicElo] and not self.siCompetitivo)):
896893
if siUltimo or self.ayudas == 0:
897894
return
@@ -1388,7 +1385,7 @@ def utilidades(self, liMasOpciones=None, siArbol=True):
13881385
def showAnalisis(self):
13891386
um = self.procesador.unMomento()
13901387
alm = Histogram.genHistograms(self.partida, self.configuracion.centipawns)
1391-
alm.indexesHTML, alm.indexesRAW = AnalisisIndexes.genIndexes(self.partida)
1388+
alm.indexesHTML, alm.indexesRAW = AnalisisIndexes.genIndexes(self.partida, alm)
13921389
um.final()
13931390
PantallaAnalisis.showGraph(self.pantalla, self, alm, Analisis.muestraAnalisis)
13941391

Code/Gestor.pyc

48.2 KB
Binary file not shown.

Code/Gestor60.pyc

9.36 KB
Binary file not shown.

Code/GestorAlbum.pyc

7.66 KB
Binary file not shown.

Code/GestorAperturas.pyc

7.92 KB
Binary file not shown.

Code/GestorBooks.pyc

10.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)