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

Commit

Permalink
Version 11.14
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmonk committed Dec 2, 2018
1 parent 623b612 commit 4696203
Show file tree
Hide file tree
Showing 450 changed files with 31,737 additions and 25,522 deletions.
5 changes: 4 additions & 1 deletion Code/Configuracion.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def __init__(self, user):
self.rivalInicial = "rocinante" if VarGen.isLinux else "irina"
self.rival = self.buscaRival(self.rivalInicial)

self.tutorInicial = "mcbrain"
self.tutorInicial = "mccain"
self.tutor = self.buscaRival(self.tutorInicial)
self.tutorMultiPV = 10 # 0: maximo
self.tutorDifPts = 0
Expand Down Expand Up @@ -830,6 +830,9 @@ def lee(self):

TrListas.ponPiecesLNG(self.siNomPiezasEN or self.traductor == "en")

def dataDB(self):
return os.path.join(self.carpeta, "_dataDB")

def testFavoritos(self):
if len(self.liFavoritos) > 0:
if type(self.liFavoritos[0]) != type({}):
Expand Down
2 changes: 1 addition & 1 deletion Code/EnginesBunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def relaciones(dicRivales):
zappa=d2b4 e2e4 f1d3 b3a4 g1e2 h1g1 c1d2 h2h3 h2h3 b3a4 a4f4 d2c4 c3b5 d1d4 e1c1 d4d5 c1f4 e3e4 d4d5 c1g5 c1f4 e1c1 a1d1 d2d4 a4b5 f1e1 c1e3 c1e3 c1e3 f1e1 c1f4 e2f4 e1g1 d2b3 c1d2 b1c3 e4e5 g5f6 f3d2 d1d3 d4e5 c1d2 a2a3 e1g1 c4b5 c3e2 c3d1 e1c1 f1g2 e3d4 d4d5 a3a4 a4c4 a4b5 a4b5 d2d4 b1c3 f3e5 d2d4 b1c3 b2b3 c1e3 e1g1 d2b3 b1c3 b1a3 g2c6 f3e5 a2a3 c1f4 c4d3 c4d3 d2d4 f1d3 d4e5 b1c3 e1f2 b5c6 d1a4 c6c2 e1g1 h2h3 g5f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 b2b3 f1e2 b1d2 d2d3 b1a3 f3h4 h2h3 f1g2
andscacs=d2g5 e2e4 c1d2 e3e4 g1e2 c4c5 c1d2 b3e3 h2h3 b3d1 a4d7 d2c4 f1e2 d1d4 e1c1 d4d5 c1f4 b2b3 d2g5 c1g5 c1g5 e2g3 a2a4 d2d4 a4b5 c1g5 c1g5 g1h2 a2a3 a2a4 c1g5 e3g5 e1g1 a2a4 c1e3 a2a4 f1e1 a2a4 d1a4 d1d3 d4d5 a2a3 f1d1 e1g1 c4b5 c3d5 c3d1 e1g1 f1g2 e3d4 d4d5 f1e1 a4c4 a4b5 a4b5 d2d4 e1g1 f3e5 d2d4 b1c3 f3e5 a2a3 e1g1 c2c4 b1c3 b1a3 g2c6 b2b3 f1e1 c6c2 c4e2 c4d3 d2d3 f1c4 d4e5 b1a3 g2g3 b5d3 d2d3 c6c2 e1g1 h2h3 c4c5 e1g1 c4c5 d2d4 f2f3 e3d4 e1c1 c1f4 f1e2 d2d4 b2b3 c1b2 b5c3 a2a4 a2a4 f1e2 f2f3 f1h3
Expand Down
18 changes: 10 additions & 8 deletions Code/EnginesLinux32.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,8 @@ def mas(cm):
cm.ponMultiPV(20, 218)
mas(cm)

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 = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "10 32bits", "http://stockfishchess.org/")
cm.path = "Linux/stockfish-v10-1_x32_linux"
cm.elo = 3300
cm.ordenUCI("Ponder", "false")
cm.ordenUCI("Hash", "64")
Expand Down Expand Up @@ -90,7 +89,10 @@ def mas(cm):

cm = ConfigMotor("godel", "Juan Manuel Vazquez", "4.0.7", "https://sites.google.com/site/godelchessengine")
cm.path = "Godel32"
cm.elo = 2600
cm.elo = 2814
cm.ordenUCI("Hash", "32")
cm.ordenUCI("Ponder", "false")
cm.nombre = "Gödel 4.4.5".decode("utf-8")
mas(cm)

cm = ConfigMotor("daydreamer", "Aaron Becker", "1.75 JA", "http://github.com/AaronBecker/daydreamer/downloads")
Expand Down Expand Up @@ -151,9 +153,9 @@ def mas(cm):
cm.ordenUCI("Hash", "64")
mas(cm)

cm = ConfigMotor("mcbrain", "Michael Byrne", "9.9", "https://github.com/MichaelB7/Stockfish/releases")
cm.path = "McBrain-v99_x32_linux"
cm.elo = 3200
cm = ConfigMotor("mccain", "Michael Byrne", "10.1", "https://github.com/MichaelB7/Stockfish/releases")
cm.path = "McCain-v10-1_x32.exe"
cm.elo = 3300
cm.ordenUCI("Contempt", "0")
cm.ordenUCI("Hash", "64")
cm.ponMultiPV(20, 256)
Expand All @@ -173,7 +175,7 @@ def dicMotoresFixedElo():
for nm, desde, hasta in (
("cheng", 800, 2500),
("greko", 1600, 2400),
("mcbrain", 1500, 2800),
("mccain", 1500, 2800),
("discocheck", 1500, 2700),
):
for elo in range(desde, hasta + 100, 100):
Expand Down
19 changes: 11 additions & 8 deletions Code/EnginesLinux64.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def mas(cm):
cm.ponMultiPV(20, 218)
mas(cm)

cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "9", "http://stockfishchess.org/")
cm.path = "Linux/stockfish-9-64"
cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "10", "http://stockfishchess.org/")
cm.path = "Linux/stockfish_10_x64"
cm.elo = 3300
cm.ordenUCI("Ponder", "false")
cm.ordenUCI("Hash", "64")
Expand Down Expand Up @@ -80,9 +80,12 @@ def mas(cm):
cm.ordenUCI("Log", "false")
mas(cm)

cm = ConfigMotor("godel", "Juan Manuel Vazquez", "4.0.7", "https://sites.google.com/site/godelchessengine")
cm = ConfigMotor("godel", "Juan Manuel Vazquez", "4.4.5", "https://sites.google.com/site/godelchessengine")
cm.path = "Godel64"
cm.elo = 2600
cm.elo = 2814
cm.ordenUCI("Hash", "32")
cm.ordenUCI("Ponder", "false")
cm.nombre = "Gödel 4.4.5".decode("utf-8")
mas(cm)

cm = ConfigMotor("daydreamer", "Aaron Becker", "1.75 JA", "http://github.com/AaronBecker/daydreamer/downloads")
Expand Down Expand Up @@ -138,9 +141,9 @@ def mas(cm):
cm.ordenUCI("Hash", "64")
mas(cm)

cm = ConfigMotor("mcbrain", "Michael Byrne", "9.9", "https://github.com/MichaelB7/Stockfish/releases")
cm.path = "McBrain-v99_x64_linux"
cm.elo = 3200
cm = ConfigMotor("mccain", "Michael Byrne", "10.1", "https://github.com/MichaelB7/Stockfish/releases")
cm.path = "McCain-v10-1_x64_linux"
cm.elo = 3300
cm.ordenUCI("Contempt", "0")
cm.ordenUCI("Hash", "64")
cm.ponMultiPV(20, 256)
Expand All @@ -165,7 +168,7 @@ def dicMotoresFixedElo():
for nm, desde, hasta in (
("cheng", 800, 2500),
("greko", 1600, 2400),
("mcbrain", 1500, 2800),
("mccain", 1500, 2800),
("discocheck", 1500, 2700),
):
for elo in range(desde, hasta + 100, 100):
Expand Down
23 changes: 11 additions & 12 deletions Code/EnginesWindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,12 @@ def mas(cm):
cm.ordenUCI("Hash", "32")
mas(cm)

cm = ConfigMotor("godel", "Juan Manuel Vazquez", "4.0.7", "https://sites.google.com/site/godelchessengine")
cm = ConfigMotor("godel", "Juan Manuel Vazquez", "4.4.5", "https://sites.google.com/site/godelchessengine")
cm.path = "Godel32.exe"
cm.elo = 2720
cm.elo = 2814
cm.ordenUCI("Hash", "32")
cm.ordenUCI("Ponder", "false")
cm.nombre = "Gödel 4.0.7".decode("utf-8")

cm.nombre = "Gödel 4.4.5".decode("utf-8")
mas(cm)

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

cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "9 32bits", "http://stockfishchess.org/")
cm.path = "Windows/stockfish_9_x32.exe"
cm.path_64 = "Windows/stockfish_9_x64_bmi2.exe", "9 64bits bmi2"
cm = ConfigMotor("stockfish", "Tord Romstad, Marco Costalba, Joona Kiiski", "10 32bits", "http://stockfishchess.org/")
cm.path = "Windows/stockfish_10_x32.exe"
cm.path_64 = "Windows/stockfish_10_x64_bmi2.exe", "10 64bits bmi2"
cm.elo = 3300
cm.ordenUCI("Ponder", "false")
cm.ordenUCI("Hash", "64")
cm.ordenUCI("Threads", "1")
cm.ponMultiPV(20, 500)
mas(cm)

cm = ConfigMotor("mcbrain", "Michael Byrne", "9.9 32bit", "https://github.com/MichaelB7/Stockfish/releases")
cm.path = "McBrain-v99_x32_old.exe"
cm.path_64 = "McBrain-v99_x64_bmi2.exe", "9.9 64bit bmi2"
cm.elo = 3200
cm = ConfigMotor("mccain", "Michael Byrne", "10.1 32bit", "https://github.com/MichaelB7/Stockfish/releases")
cm.path = "McCain-v10-1_x32_old.exe"
cm.path_64 = "McCain-v10-1_x64_bmi2.exe", "10.1 64bit bmi2"
cm.elo = 3300
cm.ordenUCI("Contempt", "0")
cm.ordenUCI("Hash", "64")
cm.ponMultiPV(20, 256)
Expand Down Expand Up @@ -349,7 +348,7 @@ def dicMotoresFixedElo():
for nm, desde, hasta in (
("rodent", 600, 2600),
("amyan", 1000, 2400),
("mcbrain", 1500, 2800),
("mccain", 1500, 2800),
("rhetoric", 1300, 2600),
("cheng", 800, 2500),
("greko", 1600, 2400),
Expand Down
2 changes: 1 addition & 1 deletion Code/GestorElo.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def inicio(self, datosMotor, siCompetitivo, aplazamiento=None):

txt = "%s:%+d%s%s:%+d%s%s:%+d" % (_("Win"), self.datosMotor.pgana, nbsp,
_("Draw"), self.datosMotor.ptablas, nbsp,
_("Lost"), self.datosMotor.ppierde)
_("Loss"), self.datosMotor.ppierde)

self.ponRotulo2("<center>%s</center>" % txt)
self.pgnRefresh(True)
Expand Down
15 changes: 11 additions & 4 deletions Code/GestorEntPos.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ def inicio(self, posEntreno, numEntrenos, titEntreno, liEntrenos, siTutorActivad
self.siDirigido = False
self.siDirigidoSeguir = None
self.siDirigidoVariantes = False
solucion = None
siPartidaOriginal = False
if "|" in fenInicial:
li = fenInicial.split("|")
Expand Down Expand Up @@ -128,6 +129,11 @@ def inicio(self, posEntreno, numEntrenos, titEntreno, liEntrenos, siTutorActivad

if not siPartidaOriginal:
self.partida.reset(cp)
if solucion:
tmp_pgn = PGN.UnPGN()
tmp_pgn.leeTexto('[FEN "%s"]\n%s' % (fenInicial, solucion))
if tmp_pgn.partida.firstComment:
self.partida.setFirstComment(tmp_pgn.partida.firstComment, True)

self.partida.pendienteApertura = False

Expand Down Expand Up @@ -335,7 +341,7 @@ def siguienteJugada(self):

def piensaHumano(self, siBlancas):
fenM2 = self.partida.ultPosicion.fenM2()
if self.siDirigido and (fenM2 in self.dicDirigidoFenM2) and not self.dicDirigidoFenM2[fenM2] and self.siTutorActivado:
if self.siDirigido and (fenM2 in self.dicDirigidoFenM2) and (fenM2 != self.dicDirigidoFenM2.keys()[-1]) and not self.dicDirigidoFenM2[fenM2] and self.siTutorActivado:
self.lineaTerminadaOpciones()
return

Expand All @@ -346,8 +352,9 @@ def piensaRival(self):
self.rivalPensando = True
pensarRival = True
fenM2 = self.partida.ultPosicion.fenM2()
my_last_fenM2 = self.dicDirigidoFenM2.keys()[-1]
if self.siDirigido and self.siTutorActivado:
if fenM2 in self.dicDirigidoFenM2:
if (fenM2 in self.dicDirigidoFenM2) and (fenM2 != my_last_fenM2):
liOpciones = self.dicDirigidoFenM2[fenM2]
if liOpciones:
liJugadas = []
Expand Down Expand Up @@ -422,7 +429,7 @@ def mueveHumano(self, desde, hasta, coronacion=None):

if siMirarTutor:
fenM2 = self.partida.ultPosicion.fenM2()
if self.siDirigido and (fenM2 in self.dicDirigidoFenM2):
if self.siDirigido and (fenM2 in self.dicDirigidoFenM2) and (fenM2 != self.dicDirigidoFenM2.keys()[-1]):
liOpciones = self.dicDirigidoFenM2[fenM2]
if len(liOpciones) > 1:
self.guardaVariantes()
Expand Down Expand Up @@ -535,7 +542,7 @@ def mueveRival(self, desde, hasta, coronacion):

self.error = ""

if self.siTutorActivado and self.siDirigido and (self.partida.ultPosicion.fenM2() not in self.dicDirigidoFenM2):
if self.siTutorActivado and self.siDirigido and ((self.partida.ultPosicion.fenM2() not in self.dicDirigidoFenM2) or (self.partida.ultPosicion.fenM2() == self.dicDirigidoFenM2.keys()[-1])):
self.lineaTerminadaOpciones()

return True
Expand Down
2 changes: 1 addition & 1 deletion Code/GestorMicElo.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def inicio(self, datosMotor, minutos, segundos, siCompetitivo, aplazamiento=None

txt = "%s:%+d%s%s:%+d%s%s:%+d" % (_("Win"), self.datosMotor.pgana, nbsp,
_("Draw"), self.datosMotor.ptablas, nbsp,
_("Lost"), self.datosMotor.ppierde)
_("Loss"), self.datosMotor.ppierde)
self.ponRotulo1("<center>%s</center>" % txt)
self.ponRotulo2("")
self.pgnRefresh(True)
Expand Down
4 changes: 2 additions & 2 deletions Code/GestorPGN.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def fichero(self, siNuestro=False, siBuscar=False, path=""):

# ~ else ya esta el nombre

fpgn = PGN.PGN()
fpgn = PGN.PGN(self.configuracion)

dicDB = fpgn.leeFichero(self.pantalla, path)
if dicDB is None:
Expand Down Expand Up @@ -327,7 +327,7 @@ def ficheroMostrar(self, dicDB, siRepite, siAnterior=False, siSiguiente=False):
bd.cerrar()

if siSeHaBorradoAlgo:
fpgn = PGN.PGN()
fpgn = PGN.PGN(self.configuracion)
fpgn.borraReferenciaA(dicDB["FICHERO"])

if siMostrar:
Expand Down
1 change: 1 addition & 0 deletions Code/GestorPerson.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def inicio(self, dic, aplazamiento=None, siPrimeraJugadaHecha=False):
if aplazamiento:
dic = aplazamiento["EMDIC"]
self.reinicio = dic
self.cache = {}

self.tipoJuego = kJugEntMaq

Expand Down
14 changes: 10 additions & 4 deletions Code/GestorTacticas.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def inicio(self, tactica, posSiguiente=None):
self.fenInicial = fenInicial

self.dicEtiquetasPGN = None
solucion = None
siPartidaOriginal = False
nli = len(li)
if nli >= 2:
Expand Down Expand Up @@ -109,6 +110,11 @@ def inicio(self, tactica, posSiguiente=None):

if not siPartidaOriginal:
self.partida.reset(cp)
if solucion:
tmp_pgn = PGN.UnPGN()
tmp_pgn.leeTexto('[FEN "%s"]\n%s' % (fenInicial, solucion))
if tmp_pgn.partida.firstComment:
self.partida.setFirstComment(tmp_pgn.partida.firstComment, True)

self.partida.pendienteApertura = False

Expand Down Expand Up @@ -307,7 +313,7 @@ def siguienteJugada(self):
if siRival:
fenM2 = self.partida.ultPosicion.fenM2()
siPiensaRival = False
if fenM2 in self.dicDirigidoFenM2:
if (fenM2 in self.dicDirigidoFenM2) and (fenM2 != self.dicDirigidoFenM2.keys()[-1]):
liOpciones = self.dicDirigidoFenM2[fenM2]
if liOpciones:
liJugadas = []
Expand Down Expand Up @@ -354,7 +360,7 @@ def siguienteJugada(self):

if not self.siSeguirJugando:
fenM2 = self.partida.ultPosicion.fenM2()
if fenM2 not in self.dicDirigidoFenM2:
if (fenM2 not in self.dicDirigidoFenM2) or (fenM2 == self.dicDirigidoFenM2.keys()[-1]):
return self.finLinea()

self.siJuegaHumano = True
Expand Down Expand Up @@ -403,7 +409,7 @@ def mueveHumano(self, desde, hasta, coronacion=None):
movimiento = jg.movimiento()

fenM2 = self.partida.ultPosicion.fenM2()
if fenM2 in self.dicDirigidoFenM2:
if (fenM2 in self.dicDirigidoFenM2) and (fenM2 != self.dicDirigidoFenM2.keys()[-1]):
liOpciones = self.dicDirigidoFenM2[fenM2]
if len(liOpciones) > 1:
self.guardaVariantes()
Expand Down Expand Up @@ -489,7 +495,7 @@ def mueveRival(self, desde, hasta, coronacion):
else:

fenM2 = self.partida.ultPosicion.fenM2()
if not (fenM2 in self.dicDirigidoFenM2):
if (not (fenM2 in self.dicDirigidoFenM2)) or (fenM2 == self.dicDirigidoFenM2.keys()[-1]):
self.analizaTutor() # Que analice antes de activar humano, para que no tenga que esperar
self.siAnalizadoTutor = True

Expand Down
2 changes: 1 addition & 1 deletion Code/Init.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from Code.Constantes import *

DEBUG = False
VERSION = "11.13d"
VERSION = "11.14"

if DEBUG:
prlkn("DEBUG " * 20)
Expand Down
26 changes: 14 additions & 12 deletions Code/Jugada.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,30 +164,32 @@ def numMove(self):

def listaSonidos(self):
pgn = self.pgnBase
liMedio = []
liFinal = []
if pgn[0] == "O":
liInicial = [pgn]
liMedio = []
liFinal = []
else:
if "=" in pgn:
liFinal = ["=", pgn[-1]]
pgn = pgn[:-2]
ult = pgn[-1]
if ult.lower() in "qrnb":
liFinal = ["=", pgn[-1]]
pgn = pgn[:-2]
else:
liFinal = ["=", pgn[-2], pgn[-1]]
pgn = pgn[:-3]
elif pgn.endswith("e.p."):
# liFinal = [ "e.p." ]
pgn = pgn[:-4]
else:
liFinal = []
liMedio = [pgn[-2], pgn[-1]]
pgn = pgn[:-2]
liInicial = list(pgn)
if liInicial and liInicial[-1] == "x":
liInicial.append(self.posicionBase.casillas[self.hasta])
piece = self.posicionBase.casillas[self.hasta]
if piece is None: # e.p.
piece = "P"
liInicial.append(piece.upper())
if (not liInicial) or (not liInicial[0].isupper()):
liInicial.insert(0, "P")
if self.siJaqueMate:
liFinal.append("#")
elif self.siJaque:
liFinal.append("+")

li = liInicial
li.extend(liMedio)
li.extend(liFinal)
Expand Down
Loading

0 comments on commit 4696203

Please sign in to comment.