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

Commit

Permalink
Version 10.09
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmonk committed Dec 3, 2016
1 parent d44f3a5 commit abcd8af
Show file tree
Hide file tree
Showing 437 changed files with 26,294 additions and 12,081 deletions.
Binary file added Code/Albums.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion Code/Analisis.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def grabarBase(self, partida, rm, siTodos=True):
nombre = self.etiquetaMotor()
tiempo = self.etiquetaTiempo()
comentario = " {%s %s %s} " % (rm.abrTexto(), nombre, tiempo)
jugada = partida.pgnBaseRAW(self.mAnalisis.posJugada / 2 + 1)
jugada = partida.pgnBaseRAW(self.jg.posicionBase.jugadas)
li = jugada.split(" ")
n = 1 if siW else 2
if siTodos:
Expand Down
Binary file added Code/Analisis.pyc
Binary file not shown.
4 changes: 3 additions & 1 deletion Code/AnalisisIndexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def get_gamestage(cp, mrm):
def tp_gamestage(cp, mrm):
return _("Game stage"), calc_gamestage(cp, mrm), get_gamestage(cp, mrm)

def genIndexes(partida):
def genIndexes(partida, alm):
average = {True: 0, False: 0}
domination = {True: 0, False: 0}
complexity = {True: 0.0, False: 0.0}
Expand Down Expand Up @@ -312,6 +312,7 @@ def genIndexes(partida):
ct = _("Total")
cpt = " " + _("pts")
xac = txt_levels
prc = "%"

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

txtHTML = '<table border="1" cellpadding="5" cellspacing="1" >%s%s</table>' % (cab, txt)
# Analisis.csv_formula(partida)
Expand Down
Binary file added Code/AnalisisIndexes.pyc
Binary file not shown.
Binary file added Code/Apertura.pyc
Binary file not shown.
Binary file added Code/AperturasStd.pyc
Binary file not shown.
Binary file added Code/BMT.pyc
Binary file not shown.
Binary file added Code/BaseConfig.pyc
Binary file not shown.
Binary file added Code/BookGuide.pyc
Binary file not shown.
Binary file added Code/Books.pyc
Binary file not shown.
Binary file added Code/CPU.pyc
Binary file not shown.
1 change: 0 additions & 1 deletion Code/CajonDesastre.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ def dicDisk(configuracion):
dicDisk_SQL(backup, configuracion.fichEstadFicsElo, tabla="color")
dicDisk_SQL(backup, configuracion.fichEstadFideElo, tabla="color")
dicDisk_SQL(backup, configuracion.fichEstadMicElo, tabla="color")
dicDisk_SQL(backup, configuracion.carpeta + "/*.xfcc", tabla="config")
dicDisk_SQL(backup, configuracion.ficheroMate, siAllTables=True)

# Cache
Expand Down
Binary file added Code/CajonDesastre.pyc
Binary file not shown.
Binary file added Code/Configuracion.pyc
Binary file not shown.
4 changes: 2 additions & 2 deletions Code/Constantes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
kSigueApertura, kSigueUsuario, kMalApertura = range(3)

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

kFinNormal, kFinReinicio = range(2)

Expand Down
Binary file added Code/Constantes.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion Code/ControlPGN.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def actual(self):

if tipoJuego == kJugGM:
return self.actualGM()
elif tipoJuego in (kJugPGN, kJugSolo, kJugXFCC, kJugRoute):
elif tipoJuego in (kJugPGN, kJugSolo, kJugRoute):
return self.gestor.actualPGN()

if tipoJuego == kJugRemoto:
Expand Down
Binary file added Code/ControlPGN.pyc
Binary file not shown.
Binary file added Code/ControlPosicion.pyc
Binary file not shown.
117 changes: 60 additions & 57 deletions Code/DBgames.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def rootGames(self):
alm = self.root()
return alm.W + alm.B + alm.D + alm.O

def children(self, pvBase):
def children(self, pvBase, allmoves=True):
fen_base = makePV(pvBase)
li = getExMoves()
liResp = []
Expand All @@ -311,6 +311,8 @@ def children(self, pvBase):
fen = getFen()
hashFen = self._fen2hash(fen)
alm = self._readRowExt(rfather, hashFen, fen)
if not allmoves and (alm.W +alm.B+alm.D+alm.O) == 0:
continue
alm.move = move
liResp.append(alm)
return liResp
Expand Down Expand Up @@ -452,11 +454,14 @@ def siFaltanRegistrosPorLeer(self):

def filterPV(self, pv, condicionAdicional=None):
if type(pv) == list: # transpositions
li = []
for unpv in pv:
xpv = pv2xpv(unpv)
li.append('XPV GLOB "%s*"' % xpv)
condicion = "(%s)" % (" OR ".join(li),)
if pv:
li = []
for unpv in pv:
xpv = pv2xpv(unpv)
li.append('XPV GLOB "%s*"' % xpv)
condicion = "(%s)" % (" OR ".join(li),)
else:
condicion = ""
else:
xpv = pv2xpv(pv)
condicion = 'XPV GLOB "%s*"' % xpv if xpv else ""
Expand Down Expand Up @@ -554,68 +559,46 @@ def borrarLista(self, lista):
del self.liRowids[recno]
self._conexion.commit()

def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN):
def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN, allmoves=True):
liMoves = []
siBlancas = pvBase.count(" ") % 2 == 1 if pvBase else True

if pvBase is None:
root = self.dbSTAT.root()
w, d, b, o = root.W, root.D, root.B, root.O
tt = w + d + b + o
liChildren = self.dbSTAT.children(pvBase, allmoves)

tt = 0

lipvmove = []
for alm in liChildren:
w, d, b, o = alm.W, alm.D, alm.B, alm.O
t = w + d + b + o
# if t == 0:
# continue

dic = {}
pvmove = alm.move
pv = pvBase + " " + pvmove
pv = pv.strip()
lipvmove.append(pvmove)
dic["numero"] = ""
dic["pvmove"] = ""
dic["pv"] = ""
dic["analisis"] = None
dic["games"] = tt
dic["pvmove"] = pvmove
dic["pv"] = pv
dic["analisis"] = dicAnalisis.get(pvmove, None)
dic["games"] = t
tt += t
dic["white"] = w
dic["draw"] = d
dic["black"] = b
dic["other"] = o
dic["pwhite"] = w * 100.0 / tt if tt else 0.0
dic["pdraw"] = d * 100.0 / tt if tt else 0.0
dic["pblack"] = b * 100.0 / tt if tt else 0.0
dic["pother"] = o * 100.0 / tt if tt else 0.0
dic["move"] = _("Total")
dic["alm"] = None
liMoves.append(dic)
dic["pwhite"] = w * 100.0 / t if t else 0.0
dic["pdraw"] = d * 100.0 / t if t else 0.0
dic["pblack"] = b * 100.0 / t if t else 0.0
dic["pother"] = o * 100.0 / t if t else 0.0

else:
liChildren = self.dbSTAT.children(pvBase)
dic["alm"] = alm

tt = 0

lipvmove = []
for alm in liChildren:
w, d, b, o = alm.W, alm.D, alm.B, alm.O
t = w + d + b + o
# if t == 0:
# continue

dic = {}
pvmove = alm.move
pv = pvBase + " " + pvmove
pv = pv.strip()
lipvmove.append(pvmove)
dic["numero"] = ""
dic["pvmove"] = pvmove
dic["pv"] = pv
dic["analisis"] = dicAnalisis.get(pvmove, None)
dic["games"] = t
tt += t
dic["white"] = w
dic["draw"] = d
dic["black"] = b
dic["other"] = o
dic["pwhite"] = w * 100.0 / t if t else 0.0
dic["pdraw"] = d * 100.0 / t if t else 0.0
dic["pblack"] = b * 100.0 / t if t else 0.0
dic["pother"] = o * 100.0 / t if t else 0.0

dic["alm"] = alm

liMoves.append(dic)
liMoves.append(dic)

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

liMoves.append(dic)

liMoves = sorted(liMoves, key=lambda dic: -dic["games"])
liMoves = sorted(liMoves, key=lambda dic: -dic["games"])

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

g = dic["games"]
tg += g
w += dic["win"]
l += dic["lost"]
d += dic["draw"]


pvmove = dic["pvmove"]
if pvmove:
pv = dic["pv"]
Expand All @@ -676,6 +667,18 @@ def getSummary(self, pvBase, dicAnalisis, siFigurinesPGN):
dic["move"] = pvmove
dic["partida"] = p

dic = {}
dic["games"] = tg
dic["win"] = w
dic["draw"] = d
dic["lost"] = l
dic["pwin"] = w*100.0/tg if tg else 0.0
dic["pdraw"] = d*100.0/tg if tg else 0.0
dic["plost"] = l*100.0/tg if tg else 0.0
dic["pdrawwin"] = (w+d)*100.0/tg if tg else 0.0
dic["pdrawlost"] = (l+d)*100.0/tg if tg else 0.0
liMoves.append(dic)

return liMoves

def recrearSTAT(self, dispatch, depth):
Expand Down
Binary file added Code/DBgames.pyc
Binary file not shown.
Binary file added Code/DGT.pyc
Binary file not shown.
21 changes: 17 additions & 4 deletions Code/EnginesLinux.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,19 @@ def mas(cm):

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

cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "3", "http://stockfishchess.org/")
cm.path = "Linux/stockfish-3-32-ja"
cm.elo = 3079
cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "8 32bits", "http://stockfishchess.org/")
cm.path = "Linux/stockfish_8_x32_old"
cm.path_64 = "Linux/stockfish_8_x64", "8 64bits"
cm.elo = 3300
cm.ordenUCI("Ponder", "false")
cm.ordenUCI("Hash", "32")
cm.ordenUCI("Hash", "64")
cm.ordenUCI("Threads", "1")
cm.ponMultiPV(20, 500)
mas(cm)
Expand Down Expand Up @@ -147,6 +149,17 @@ def mas(cm):
cm.elo = 2900
mas(cm)

cm = ConfigMotor("irina", "Lucas Monge", "0.12", "")
cm.path = "irina"
cm.elo = 1200
mas(cm)

cm = ConfigMotor("rodentII", "Pawel Koziol", "0.9.64", "http://www.pkoziol.cal24.pl/rodent/rodent.htm")
cm.path = "RodentII_x32"
cm.elo = 2912
cm.ordenUCI("Hash", "64")
mas(cm)

return dicRivales

def dicMotoresFixedElo():
Expand Down
Binary file added Code/EnginesMicElo.pyc
Binary file not shown.
14 changes: 7 additions & 7 deletions Code/EnginesWindows.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# -*- coding: latin-1 -*-

import collections

Expand Down Expand Up @@ -149,7 +149,7 @@ def mas(cm):
cm.ponMultiPV(1, 4)
mas(cm)

cm = ConfigMotor("cheng", "Martin Sedlák", "4 0.39", "http://www.vlasak.biz/cheng")
cm = ConfigMotor("cheng", "Martin Sedlák", "4 0.39", "http://www.vlasak.biz/cheng")
cm.path = "cheng4.exe"
cm.elo = 2750
cm.ponMultiPV(20, 256)
Expand Down Expand Up @@ -219,7 +219,7 @@ def mas(cm):
cm.ponMultiPV(20, 100)
mas(cm)

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

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

Expand Down
Binary file added Code/EnginesWindows.pyc
Binary file not shown.
Binary file added Code/Entrenamientos.pyc
Binary file not shown.
Binary file added Code/Everest.pyc
Binary file not shown.
Binary file added Code/GM.pyc
Binary file not shown.
23 changes: 10 additions & 13 deletions Code/Gestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ def __init__(self, procesador):
self.ayudas = None
self.ayudasPGN = 0

self.siCompetitivo = False

self.resultado = kDesconocido

self.categoria = None
Expand Down Expand Up @@ -145,16 +147,14 @@ def otherCandidates(self, liMoves, posicion, liC):
liPlayer.append((mov.hasta(), "P+"))
elif mov.captura():
liPlayer.append((mov.hasta(), "Px"))
fen = posicion.fen()
if "w" in fen:
fen = fen.replace(" w ", " b ")
else:
fen = fen.replace(" b ", " w ")
oposic = posicion.copia()
oposic.siBlancas = not posicion.siBlancas
oposic.alPaso = ""
siJaque = LCEngine.isCheck()
LCEngine.setFen(fen)
LCEngine.setFen(oposic.fen())
liO = LCEngine.getExMoves()
liRival = []
for mov in liO:
for n, mov in enumerate(liO):
if not siJaque:
if mov.mate():
liRival.append((mov.hasta(), "R#"))
Expand Down Expand Up @@ -443,9 +443,7 @@ def ponVista(self):

def siMiraKibitzers(self):
return (self.estado == kFinJuego) or \
self.tipoJuego in (
kJugEntPos, kJugPGN, kJugEntMaq, kJugEntTac, kJugGM, kJugSolo, kJugBooks, kJugAperturas,
kJugXFCC) or \
self.tipoJuego in (kJugEntPos, kJugPGN, kJugEntMaq, kJugEntTac, kJugGM, kJugSolo, kJugBooks, kJugAperturas) or \
(self.tipoJuego in (kJugElo, kJugMicElo) and not self.siCompetitivo)

def miraKibitzers(self, jg, columnaClave):
Expand Down Expand Up @@ -890,8 +888,7 @@ def analizaPosicion(self, fila, clave):
if self.estado == kFinJuego:
maxRecursion = 9999
else:
if not (self.tipoJuego in [kJugEntPos, kJugPGN, kJugEntMaq, kJugGM, kJugSolo, kJugBooks, kJugAperturas,
kJugEntTac, kJugXFCC] or
if not (self.tipoJuego in [kJugEntPos, kJugPGN, kJugEntMaq, kJugGM, kJugSolo, kJugBooks, kJugAperturas, kJugEntTac] or
(self.tipoJuego in [kJugElo, kJugMicElo] and not self.siCompetitivo)):
if siUltimo or self.ayudas == 0:
return
Expand Down Expand Up @@ -1388,7 +1385,7 @@ def utilidades(self, liMasOpciones=None, siArbol=True):
def showAnalisis(self):
um = self.procesador.unMomento()
alm = Histogram.genHistograms(self.partida, self.configuracion.centipawns)
alm.indexesHTML, alm.indexesRAW = AnalisisIndexes.genIndexes(self.partida)
alm.indexesHTML, alm.indexesRAW = AnalisisIndexes.genIndexes(self.partida, alm)
um.final()
PantallaAnalisis.showGraph(self.pantalla, self, alm, Analisis.muestraAnalisis)

Expand Down
Binary file added Code/Gestor.pyc
Binary file not shown.
Binary file added Code/Gestor60.pyc
Binary file not shown.
Binary file added Code/GestorAlbum.pyc
Binary file not shown.
Binary file added Code/GestorAperturas.pyc
Binary file not shown.
Binary file added Code/GestorBooks.pyc
Binary file not shown.
Loading

0 comments on commit abcd8af

Please sign in to comment.