diff --git a/Code/Analisis.py b/Code/Analisis.py
index 650e20e..8d45b17 100644
--- a/Code/Analisis.py
+++ b/Code/Analisis.py
@@ -419,7 +419,7 @@ def guiDispatch(rm):
if siBP2:
tmpBP.pon(2, npos + 1)
else:
- tmpBP.pon(npos + 1)
+ tmpBP.pon(npos)
if self.rutDispatchBP:
self.rutDispatchBP(npos, nJugadas, njg)
diff --git a/Code/AnalisisIndexes.py b/Code/AnalisisIndexes.py
index 9863f10..51c293e 100644
--- a/Code/AnalisisIndexes.py
+++ b/Code/AnalisisIndexes.py
@@ -1,4 +1,4 @@
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import VarGen
from Code import Partida
diff --git a/Code/AperturasStd.py b/Code/AperturasStd.py
index 5bcbf87..85a7586 100644
--- a/Code/AperturasStd.py
+++ b/Code/AperturasStd.py
@@ -1,4 +1,4 @@
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from operator import attrgetter
diff --git a/Code/CajonDesastre.py b/Code/CajonDesastre.py
index a83b37b..6dfbc00 100644
--- a/Code/CajonDesastre.py
+++ b/Code/CajonDesastre.py
@@ -4,7 +4,7 @@
import shutil
import sqlite3
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import BaseConfig
from Code import Util
diff --git a/Code/Configuracion.py b/Code/Configuracion.py
index 90ed3b6..c96fd4c 100644
--- a/Code/Configuracion.py
+++ b/Code/Configuracion.py
@@ -130,7 +130,7 @@ def __init__(self, user):
self.estilo = "Cleanlooks"
self.vistaTutor = kTutorH
- self.efectosVisuales = True
+ self.efectosVisuales = False
self.rapidezMovPiezas = 100
self.guardarVariantesTutor = True
@@ -211,7 +211,7 @@ def __init__(self, user):
self.dicRivales = Engines.leeRivales()
- self.rivalInicial = "rocinante" if VarGen.isLinux else "tarrasch"
+ self.rivalInicial = "rocinante" if VarGen.isLinux else "irina"
self.rival = self.buscaRival(self.rivalInicial)
self.tutorInicial = "mcbrain"
@@ -331,6 +331,7 @@ def ponCarpetas(self, user):
self.ficheroPlayPGN = "%s/PlayPGN.db" % self.carpeta
self.ficheroAlbumes = "%s/albumes.pkd" % self.carpeta
self.ficheroPuntuaciones = "%s/hpoints.pkd" % self.carpeta
+ self.ficheroAnotar = "%s/anotar.db" % self.carpeta
self.ficheroSelectedPositions = "%s/Selected positions.fns" % self.dirPersonalTraining
self.ficheroPresentationPositions = "%s/Challenge 101.fns" % self.dirPersonalTraining
@@ -895,10 +896,12 @@ def listaMotoresInternos(self):
li = sorted(li, key=lambda cm: cm.nombre)
return li
- def listaMotoresExternos(self):
+ def listaMotoresExternos(self, ordenados=True):
listaMotoresExt = MotoresExternos.ListaMotoresExternos(self.ficheroMExternos)
listaMotoresExt.leer()
- li = sorted(listaMotoresExt.liMotores, key=lambda cm: cm.alias)
+ li = listaMotoresExt.liMotores
+ if ordenados:
+ li.sort(key=lambda cm: cm.alias)
return li
def listaMotores(self):
diff --git a/Code/Constantes.py b/Code/Constantes.py
index 6930fa6..4fe10f8 100644
--- a/Code/Constantes.py
+++ b/Code/Constantes.py
@@ -6,8 +6,8 @@
kJugNueva, kJugEntPos, kJugPGN, kJugEntMaq, kJugGM, kJugRemoto, kJugSolo, kJug60, kJugElo, kJugMicElo,
kJugBooks, kJugAperturas, kJugOpeningLines, kJugBoxing, kJugEntTac, kJugMvM, kJugAlbum, kJugFics, kJugFide,
kJugLichess, kJugWorldMap, kJugRoute, kJugEntLight, kJugWashingCreate, kJugWashingTactics, kJugWashingReplay,
- kJugSingularMoves
-) = range(27)
+ kJugSingularMoves, kJugAnotar
+) = range(28)
kFinNormal, kFinReinicio = range(2)
diff --git a/Code/ControlPGN.py b/Code/ControlPGN.py
index 336cc25..5991341 100644
--- a/Code/ControlPGN.py
+++ b/Code/ControlPGN.py
@@ -154,7 +154,7 @@ def actual(self):
if tipoJuego == kJugGM:
return self.actualGM()
- elif tipoJuego in (kJugPGN, kJugSolo, kJugRoute, kJugEntLight):
+ elif tipoJuego in (kJugPGN, kJugSolo, kJugRoute, kJugEntLight, kJugAnotar):
return self.gestor.actualPGN()
if tipoJuego == kJugRemoto:
diff --git a/Code/ControlPosicion.py b/Code/ControlPosicion.py
index eebfb4e..9850da6 100644
--- a/Code/ControlPosicion.py
+++ b/Code/ControlPosicion.py
@@ -1,4 +1,4 @@
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import TrListas
diff --git a/Code/DBgames.py b/Code/DBgames.py
index b37e02d..6a973f4 100644
--- a/Code/DBgames.py
+++ b/Code/DBgames.py
@@ -4,7 +4,7 @@
import time
import random
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import ControlPosicion
from Code import Partida
diff --git a/Code/DBgamesFEN.py b/Code/DBgamesFEN.py
index 0c66424..77d096d 100644
--- a/Code/DBgamesFEN.py
+++ b/Code/DBgamesFEN.py
@@ -4,7 +4,7 @@
import time
import random
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Partida
from Code import Util
diff --git a/Code/EnginesBunch.py b/Code/EnginesBunch.py
index e050785..08b09dd 100644
--- a/Code/EnginesBunch.py
+++ b/Code/EnginesBunch.py
@@ -1,4 +1,5 @@
+
def relaciones(dicRivales):
result = """
stockfish=b2b3 e2e4 c1d2 e3e4 g1e2 c4c5 c1d2 b3e3 e1g1 b3d1 a4d7 d2c4 f1b5 d1d4 a1c1 c4c5 d4d5 a2a4 d1c1 e2e4 c1f4 e2c1 e1g1 d2d4 a4b5 h2h3 c1g5 d3d4 b2b3 a2a4 f2f4 a2a4 e1g1 d3d4 a2a4 b1c3 f1e1 d1c1 d1a4 b2b3 d4d5 c1d2 a2a3 h2h3 c4b5 c3e2 c3d1 e1g1 f1g2 e3d4 d1e2 f1e1 a4c4 a4b5 a4b5 d2d4 e1g1 c2c3 d2d4 e1g1 a2a4 d4d5 e1g1 d2b3 b1c3 d2d3 g2c6 b2b3 d4d5 c1e3 c4d3 c4d3 a2a4 f1d3 d4e5 b1a3 g2g3 b5e2 d2d3 c1e3 e1g1 d4d5 c4c5 e2f4 c4c5 d2d4 b1c3 e3d4 g2g4 f1e1 c1f4 d2d4 b2b3 c1b2 b5c3 a2a4 d2d3 f1e2 e2e3 f1g2
@@ -76,6 +77,7 @@ def relaciones(dicRivales):
d[s] = n
return d
+
def filtra(dicRivales):
d = relaciones(dicRivales)
stkeys = set()
@@ -85,6 +87,7 @@ def filtra(dicRivales):
dresp = {k:v for k,v in dicRivales.iteritems() if k in stkeys}
return dresp
+
def getLista(configuracion, num_elementos):
def haz(xdrel, clave):
s = set()
@@ -106,7 +109,7 @@ def haz(xdrel, clave):
resp = otro
mx = x
if resp == None:
- print "error", repet, clave
+ pass
s.add(resp)
total += mx
li = list(s)
@@ -151,6 +154,7 @@ def haz(xdrel, clave):
dlista[clave] = s
return dlista
+
def getListaClave(configuracion, num_elementos, clave):
dlista = getLista(configuracion, num_elementos)
- return dlista[clave]
\ No newline at end of file
+ return dlista[clave]
diff --git a/Code/EnginesLinux32.py b/Code/EnginesLinux32.py
index ade23b1..ce363f6 100644
--- a/Code/EnginesLinux32.py
+++ b/Code/EnginesLinux32.py
@@ -151,8 +151,8 @@ def mas(cm):
cm.ordenUCI("Hash", "64")
mas(cm)
- cm = ConfigMotor("mcbrain", "Michael Byrne", "9.1", "https://github.com/MichaelB7/Stockfish/releases")
- cm.path = "McBrain-91_x32_linux"
+ cm = ConfigMotor("mcbrain", "Michael Byrne", "9.9", "https://github.com/MichaelB7/Stockfish/releases")
+ cm.path = "McBrain-v99_x32_linux"
cm.elo = 3200
cm.ordenUCI("Contempt", "0")
cm.ordenUCI("Hash", "64")
diff --git a/Code/EnginesLinux64.py b/Code/EnginesLinux64.py
index d3aff76..d52881b 100644
--- a/Code/EnginesLinux64.py
+++ b/Code/EnginesLinux64.py
@@ -138,8 +138,8 @@ def mas(cm):
cm.ordenUCI("Hash", "64")
mas(cm)
- cm = ConfigMotor("mcbrain", "Michael Byrne", "9.1", "https://github.com/MichaelB7/Stockfish/releases")
- cm.path = "McBrain-91_x64_linux"
+ cm = ConfigMotor("mcbrain", "Michael Byrne", "9.9", "https://github.com/MichaelB7/Stockfish/releases")
+ cm.path = "McBrain-v99_x64_linux"
cm.elo = 3200
cm.ordenUCI("Contempt", "0")
cm.ordenUCI("Hash", "64")
diff --git a/Code/EnginesWindows.py b/Code/EnginesWindows.py
index b758492..99c19f3 100644
--- a/Code/EnginesWindows.py
+++ b/Code/EnginesWindows.py
@@ -218,9 +218,9 @@ def mas(cm):
cm.ponMultiPV(20, 500)
mas(cm)
- cm = ConfigMotor("mcbrain", "Michael Byrne", "9.1 32bit", "https://github.com/MichaelB7/Stockfish/releases")
- cm.path = "McBrain-91_x32_old.exe"
- cm.path_64 = "McBrain-91_x64_bmi2.exe", "9.1 64bit bmi2"
+ 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.ordenUCI("Contempt", "0")
cm.ordenUCI("Hash", "64")
diff --git a/Code/Entrenamientos.py b/Code/Entrenamientos.py
index fab613c..f2429e2 100644
--- a/Code/Entrenamientos.py
+++ b/Code/Entrenamientos.py
@@ -350,6 +350,9 @@ def menuTacticas(submenu, tipo, carpetaBase, lista):
menu1.separador()
xopcion(menu1, "visualiza", _("The board at a glance"), Iconos.Gafas())
+ menu1.separador()
+ xopcion(menu1, "anotar", _("Writing down moves of a game"), Iconos.Write())
+
# menu2 = menu1.submenu(_("Endings with 3/4 pieces"), Iconos.Puente())
# xopcion(menu2, "end_t4-1", "%s %d"%(_("Level"), 1), Iconos.PuntoAzul())
# xopcion(menu2, "end_t4-2", "%s %d"%(_("Level"), 2), Iconos.PuntoMagenta())
@@ -406,6 +409,9 @@ def menu_run(self, resp):
elif resp == "visualiza":
self.visualiza()
+ elif resp == "anotar":
+ self.anotar()
+
elif resp.startswith("tactica|"):
nada, tipo, nombre, carpeta, ini = resp.split("|")
self.tacticas(tipo, nombre, carpeta, ini)
@@ -630,6 +636,9 @@ def potencia(self):
def visualiza(self):
PantallaVisualiza.pantallaVisualiza(self.procesador)
+ def anotar(self):
+ self.procesador.show_anotar()
+
def puente(self, nivel):
PantallaPuente.pantallaPuente(self.procesador, nivel)
diff --git a/Code/Everest.py b/Code/Everest.py
index 3bc652d..a7d75d7 100644
--- a/Code/Everest.py
+++ b/Code/Everest.py
@@ -1,4 +1,7 @@
-import LCEngineV1 as LCEngine
+import os
+import random
+
+import LCEngine2 as LCEngine
from Code import Partida
from Code.SQL import Base
@@ -10,6 +13,22 @@ def str_file(fichero):
return eval(f.read())
+def get_partida_random():
+ path = "./IntFiles/Everest"
+ li = [fich for fich in os.listdir(path) if fich.endswith(".str")]
+ fichero = random.choice(li)
+ litourneys = str_file(os.path.join(path, fichero))
+ dictourney = random.choice(litourneys)
+ games = dictourney["GAMES"]
+ game = random.choice(games)
+ labels = game["LABELS"]
+ xpv = game["XPV"]
+ pc = Partida.PartidaCompleta(liTags=labels)
+ pv = LCEngine.xpv2pv(xpv)
+ pc.leerPV(pv)
+ return pc
+
+
def gen_list(txt): # tolerance and tries in 12
xmin, xmax = txt.split(",")
xmin = int(xmin)
diff --git a/Code/GM.py b/Code/GM.py
index e52dc90..aed9f45 100644
--- a/Code/GM.py
+++ b/Code/GM.py
@@ -1,7 +1,7 @@
import operator
import os
-from LCEngineV1 import xpv2pv, pv2xpv
+from LCEngine2 import xpv2pv, pv2xpv
from Code import Jugada
from Code import Util
diff --git a/Code/Gestor.py b/Code/Gestor.py
index c27dbd6..418d94a 100644
--- a/Code/Gestor.py
+++ b/Code/Gestor.py
@@ -3,7 +3,7 @@
import random
import time
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Analisis
from Code import AnalisisIndexes
diff --git a/Code/Gestor60.py b/Code/Gestor60.py
index 92987b2..aa40f0a 100644
--- a/Code/Gestor60.py
+++ b/Code/Gestor60.py
@@ -2,7 +2,7 @@
import random
import time
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import ControlPosicion
from Code import Gestor
diff --git a/Code/GestorAnotar.py b/Code/GestorAnotar.py
new file mode 100644
index 0000000..98155c4
--- /dev/null
+++ b/Code/GestorAnotar.py
@@ -0,0 +1,166 @@
+import time
+
+from Code import Util
+from Code import Gestor
+from Code import Partida
+from Code.QT import QTVarios
+from Code.Constantes import *
+
+
+class GestorAnotar(Gestor.Gestor):
+ def inicio(self, partidaObjetivo, siBlancaAbajo):
+
+ self.partida = Partida.Partida()
+ self.tipoJuego = kJugAnotar
+ self.partidaObjetivo = partidaObjetivo
+ self.jugadaActual = -1
+ self.totalJugadas = len(self.partidaObjetivo)
+ self.tablero.showCoordenadas(False)
+
+ self.ayudasRecibidas = 0
+ self.errores = 0
+ self.cancelado = False
+
+ self.pantalla.ponActivarTutor(False)
+ self.siBlancasAbajo = siBlancaAbajo
+ self.ponPiezasAbajo(self.siBlancasAbajo)
+ self.mostrarIndicador(True)
+ self.siTerminar = False
+ self.pantalla.ponToolBar((k_mainmenu,))
+ self.pantalla.habilitaToolbar(k_mainmenu, False)
+ self.informacionActivable = False
+ self.pantalla.activaInformacionPGN(False)
+ self.pantalla.activaJuego(False, False, siAyudas=False)
+ self.ponActivarTutor(False)
+ self.quitaAyudas()
+ self.ponVista()
+ self.ponRotulo1("")
+ self.ponRotulo2("")
+
+ self.estado = kJugando
+
+ self.desactivaTodas()
+
+ self.tiempo = 0.0
+
+ self.siguienteJugada()
+
+ def siguienteJugada(self):
+ if self.estado == kFinJuego:
+ return False
+
+ self.estado = kJugando
+
+ self.jugadaActual += 1
+ if self.jugadaActual >= self.totalJugadas:
+ self.finalizar()
+ return False
+
+ self.ponPiezasAbajo(self.siBlancasAbajo)
+
+ self.ponPosicion(self.partida.ultPosicion)
+
+ siBlancas = self.partida.siBlancas()
+ self.colorJugando = siBlancas
+
+ self.ponIndicador(siBlancas)
+ jg = self.partidaObjetivo.jugada(self.jugadaActual)
+ self.partida.append_jg(jg)
+ if self.partida.pendienteApertura:
+ self.partida.asignaApertura()
+ self.movimientosPiezas(jg.liMovs, True)
+ self.tablero.ponFlechaSC(jg.desde, jg.hasta)
+
+ tm = time.time()
+
+ w = QTVarios.ReadAnnotation(self.pantalla, jg.pgnSP())
+ if not w.exec_():
+ self.cancelado = True
+ self.finalizar()
+ return False
+
+ self.tiempo += time.time() - tm
+ conAyuda, errores = w.resultado
+ if conAyuda:
+ self.ayudasRecibidas += 1
+ self.errores += errores
+
+ self.refresh()
+
+ return self.siguienteJugada()
+
+ def procesarAccion(self, clave):
+ if clave == k_reiniciar:
+ self.inicio(self.partidaObjetivo, self.siBlancasAbajo)
+
+ elif clave in (k_cancelar, k_mainmenu):
+ self.tablero.showCoordenadas(True)
+ self.procesador.inicio()
+ self.procesador.show_anotar()
+
+ elif clave == k_configurar:
+ self.configurar()
+
+ elif clave == k_utilidades:
+ self.utilidades()
+
+ else:
+ Gestor.Gestor.rutinaAccionDef(self, clave)
+
+ def finalX(self):
+ self.tablero.showCoordenadas(True)
+ return True
+
+ def finalizar(self):
+ self.informacionActivable = True
+ self.tablero.showCoordenadas(True)
+ self.pantalla.activaJuego(True, False, siAyudas=False)
+ self.quitaAyudas()
+ self.pantalla.ponToolBar((k_mainmenu, k_reiniciar, k_configurar, k_utilidades))
+ if self.cancelado:
+ self.partida = self.partidaObjetivo
+ self.ponteAlFinal()
+ blancas, negras, fecha, event, result = "", "", "", "", ""
+ for key, value in self.partidaObjetivo.liTags:
+ key = key.upper()
+ if key == "WHITE":
+ blancas = value
+ elif key == "BLACK":
+ negras = value
+ elif key == "DATE":
+ fecha = value
+ elif key == "EVENT":
+ event = value
+ elif key == "RESULT":
+ result = value
+
+ self.ponRotulo1("%s - %s
%s: %s
%s: %s
%s: %s" % (
+ fecha, event,
+ _("White"), blancas,
+ _("Black"), negras,
+ _("Result"), result))
+ numjug = self.jugadaActual
+ if numjug > 0:
+ self.ponRotulo2("%s: %d
%s: %0.2f\"
%s: %d
%s: %d" % (
+ _("Moves"), numjug,
+ _("Average time"), self.tiempo/numjug,
+ _("Errors"), self.errores,
+ _("Hints"), self.ayudasRecibidas
+ ))
+ if numjug > 2:
+ db = Util.DicSQL(self.configuracion.ficheroAnotar)
+ f = Util.hoy()
+ key = "%04d-%02d-%02d %02d:%02d:%02d" % (f.year, f.month, f.day, f.hour, f.minute, f.second)
+ db[key] = {
+ "PC": self.partidaObjetivo,
+ "MOVES": numjug,
+ "TIME": self.tiempo/numjug,
+ "HINTS": self.ayudasRecibidas,
+ "ERRORS": self.errores,
+ "COLOR": self.siBlancasAbajo,
+ }
+ db.close()
+
+ def actualPGN(self):
+ return self.partidaObjetivo.pgn()
+
diff --git a/Code/GestorEntMaq.py b/Code/GestorEntMaq.py
index 9c11a92..3f56cb2 100644
--- a/Code/GestorEntMaq.py
+++ b/Code/GestorEntMaq.py
@@ -1,4 +1,4 @@
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from PyQt4 import QtCore
from Code import Analisis
diff --git a/Code/GestorFideFics.py b/Code/GestorFideFics.py
index 27f2dca..7204b97 100644
--- a/Code/GestorFideFics.py
+++ b/Code/GestorFideFics.py
@@ -3,7 +3,7 @@
import datetime
import random
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Apertura
from Code import Gestor
diff --git a/Code/GestorOpeningLines.py b/Code/GestorOpeningLines.py
index 849dd0d..d8693af 100644
--- a/Code/GestorOpeningLines.py
+++ b/Code/GestorOpeningLines.py
@@ -1,7 +1,9 @@
import time
+import random
from Code import Gestor
from Code import Jugada
+from Code import Books
from Code import ControlPosicion
from Code import TrListas
from Code.QT import QTUtil2
@@ -32,9 +34,20 @@ def reinicio(self, dbop):
self.trainingEngines = self.dbop.trainingEngines()
- liTimes = self.trainingEngines["TIMES"]
+ self.auto_analysis = self.trainingEngines.get("AUTO_ANALYSIS", True)
+ self.ask_movesdifferent = self.trainingEngines.get("ASK_MOVESDIFFERENT", False)
+
+ liTimes = self.trainingEngines.get("TIMES")
+ if not liTimes:
+ liTimes = [500, 1000, 2000, 4000, 8000]
+ liBooks = self.trainingEngines.get("BOOKS")
+ if not liBooks:
+ liBooks = ["", "", "", "", ""]
liEngines = self.trainingEngines["ENGINES"]
- num_engines = len(liEngines)
+ num_engines_base = len(liEngines)
+ liEnginesExt = self.trainingEngines.get("EXT_ENGINES", [])
+ num_engines = num_engines_base+len(liEnginesExt)
+
if self.numengine >= num_engines:
self.level += 1
self.numengine = 0
@@ -49,7 +62,20 @@ def reinicio(self, dbop):
return
self.time = liTimes[self.level]
- self.keyengine = liEngines[self.numengine]
+ nombook = liBooks[self.level]
+ if nombook:
+ listaLibros = Books.ListaLibros()
+ listaLibros.recuperaVar(self.configuracion.ficheroBooks)
+ self.book = listaLibros.buscaLibro(nombook)
+ if self.book:
+ self.book.polyglot()
+ else:
+ self.book = None
+
+ if self.numengine < num_engines_base:
+ self.keyengine = liEngines[self.numengine]
+ else:
+ self.keyengine = "*" + liEnginesExt[self.numengine-num_engines_base-1]
self.plies_mandatory = self.trainingEngines["MANDATORY"]
self.plies_control = self.trainingEngines["CONTROL"]
@@ -61,7 +87,7 @@ def reinicio(self, dbop):
self.siAprobado = False
- rival = self.configuracion.buscaRival(self.keyengine)
+ rival = self.configuracion.buscaRivalExt(self.keyengine)
self.xrival = self.procesador.creaGestorMotor(rival, self.time, None)
self.xrival.siBlancas = self.siRivalConBlancas
@@ -133,18 +159,30 @@ def mueveRival(self):
si_obligatorio = self.partida.numJugadas() <= self.plies_mandatory
si_pensar = True
fenM2 = self.partida.ultPosicion.fenM2()
+ moves = self.dicFENm2.get(fenM2, set())
if si_obligatorio:
- moves = self.dicFENm2.get(fenM2, set())
nmoves = len(moves)
if nmoves == 0:
si_obligatorio = False
- elif nmoves == 1:
- move = list(moves)[0]
+ else:
+ move = self.dbop.get_cache_engines(self.keyengine, self.time, fenM2)
+ if move is None:
+ if self.book:
+ move_book = self.book.eligeJugadaTipo(self.partida.ultPosicion.fen(), "au")
+ if move_book in list(moves):
+ move = move_book
+ if move is None:
+ move = random.choice(list(moves))
+ self.dbop.set_cache_engines(self.keyengine, self.time, fenM2, move)
desde, hasta, coronacion = move[:2], move[2:4], move[4:]
si_pensar = False
if si_pensar:
- move = self.dbop.get_cache_engines(self.keyengine, self.time, fenM2)
+ move = None
+ if self.book:
+ move = self.book.eligeJugadaTipo(self.partida.ultPosicion.fen(), "mp")
+ if move is None:
+ move = self.dbop.get_cache_engines(self.keyengine, self.time, fenM2)
if move is None:
rmRival = self.xrival.juegaPartida(self.partida)
move = rmRival.movimiento()
@@ -182,9 +220,16 @@ def mueveHumano(self, desde, hasta, coronacion=""):
for move in moves:
self.tablero.creaFlechaMulti(move, False)
self.tablero.creaFlechaMulti(jg.movimiento(), True)
- self.mensajeEnPGN(_("This is not the move in the opening lines, you must repeat the game"))
- self.ponFinJuego()
- return True
+ if self.ask_movesdifferent:
+ mensaje = "%s\n%s" % (_("This is not the move in the opening lines"),
+ _("Do you want to go on with this move?"))
+ if not QTUtil2.pregunta(self.pantalla, mensaje):
+ self.ponFinJuego()
+ return True
+ else:
+ self.mensajeEnPGN(_("This is not the move in the opening lines, you must repeat the game"))
+ self.ponFinJuego()
+ return True
self.movimientosPiezas(jg.liMovs)
@@ -214,13 +259,13 @@ def masJugada(self, jg, siNuestra):
def muestraInformacion(self):
li = []
li.extend(self.li_info)
-
+
si_obligatorio = self.partida.numJugadas() < self.plies_mandatory
if si_obligatorio and self.estado != kFinJuego:
fenM2 = self.partida.ultPosicion.fenM2()
moves = self.dicFENm2.get(fenM2, [])
if len(moves) > 0:
- li.append( "%s: %d/%d" % (_("Mandatory move"), self.partida.numJugadas(), self.plies_mandatory))
+ li.append( "%s: %d/%d" % (_("Mandatory move"), self.partida.numJugadas()+1, self.plies_mandatory))
else:
si_obligatorio = False
@@ -238,6 +283,26 @@ def runcontrol(self):
if numJugadas == 0:
return False
+ um = [None] # controla unMomento
+
+ def mensEspera(siFinal=False, siCancelar=False, masTitulo=None):
+ if siFinal:
+ if um[0]:
+ um[0].final()
+ else:
+ if um[0] is None:
+ um[0] = QTUtil2.mensajeTemporal(self.pantalla, _("Analyzing"), 0, posicion="ad", siCancelar=True,
+ titCancelar=_("Cancel"))
+ if masTitulo:
+ um[0].rotulo( _("Analyzing") + " " + masTitulo )
+ um[0].me.activarCancelar(siCancelar)
+
+ def siCancelado():
+ si = um[0].cancelado()
+ if si:
+ um[0].final()
+ return si
+
def aprobado():
mens = "%s" % _("Congratulations, goal achieved")
self.li_info.append("")
@@ -260,10 +325,9 @@ def calculaJG(jg, siinicio):
tiempo = self.xjuez.motorTiempoJugada
mrm = self.dbop.get_cache_engines(nombre, tiempo, fen)
if mrm is None:
- um = self.unMomento()
+ mensEspera()
mrm = self.xjuez.analiza(fen)
self.dbop.set_cache_engines(nombre, tiempo, fen, mrm)
- um.final()
rm = mrm.mejorMov()
if (" w " in fen) == self.siJugamosConBlancas:
@@ -271,6 +335,35 @@ def calculaJG(jg, siinicio):
else:
return -rm.puntos, -rm.mate
+ def run_auto_analysis():
+ lista = []
+ for njg in range(self.partida.numJugadas()):
+ jg = self.partida.jugada(njg)
+ if jg.siBlancas() == self.siJugamosConBlancas:
+ fenM2 = jg.posicionBase.fenM2()
+ if fenM2 not in self.dicFENm2:
+ lista.append(jg)
+ jg.fenM2 = fenM2
+ total = len(lista)
+ for pos, jg in enumerate(lista, 1):
+ if siCancelado():
+ break
+ mensEspera(siCancelar=True, masTitulo="%d/%d" % (pos, total))
+ nombre = self.xanalyzer.nombre
+ tiempo = self.xanalyzer.motorTiempoJugada
+ depth = self.xanalyzer.motorProfundidad
+ mrm = self.dbop.get_cache_engines(nombre, tiempo, jg.fenM2, depth)
+ ok = False
+ if mrm:
+ rm, pos = mrm.buscaRM(jg.movimiento())
+ if rm:
+ ok = True
+ if not ok:
+ mrm, pos = self.xanalyzer.analizaJugada(jg, self.xanalyzer.motorTiempoJugada, self.xanalyzer.motorProfundidad)
+ self.dbop.set_cache_engines(nombre, tiempo, jg.fenM2, mrm, depth)
+ jg.analisis = mrm, pos
+ self.pantalla.base.pgnRefresh()
+
siCalcularInicio = True
if self.partida.siTerminada():
self.ponFinJuego()
@@ -293,6 +386,7 @@ def calculaJG(jg, siinicio):
if self.plies_pendientes > 0:
return False
# Si la ultima jugada es de la linea no se calcula nada
+ mensEspera()
puntosFinal, mateFinal = calculaJG(jg, False)
# Se marcan todas las jugadas que no siguen las lineas
@@ -331,9 +425,14 @@ def appendInfo(label, puntos, mate):
self.li_info.append(mens)
if perdidos > self.lost_points:
+ if self.auto_analysis:
+ run_auto_analysis()
+ mensEspera(siFinal=True)
suspendido()
else:
+ mensEspera(siFinal=True)
aprobado()
+
self.ponFinJuego()
return True
@@ -357,13 +456,19 @@ def procesarAccion(self, clave):
elif clave == k_utilidades:
liMasOpciones = []
liMasOpciones.append(("libros", _("Consult a book"), Iconos.Libros()))
- if self.siAprobado:
- liMasOpciones.append((None, None, None))
- liMasOpciones.append(("add_line", _("Add this line"), Iconos.OpeningLines()))
+ liMasOpciones.append((None, None, None))
+ liMasOpciones.append(("add_line", _("Add this line"), Iconos.OpeningLines()))
+ liMasOpciones.append((None, None, None))
+ mens = _("cancel") if self.auto_analysis else _("activate")
+ liMasOpciones.append(("auto_analysis", "%s: %s" % (_("Automatic analysis"), mens), Iconos.Analizar()))
+ liMasOpciones.append((None, None, None))
+ mens = _("cancel") if self.ask_movesdifferent else _("activate")
+ liMasOpciones.append(("ask_movesdifferent", "%s: %s" % (_("Ask when the moves are different from the line"), mens), Iconos.Pelicula_Seguir()))
resp = self.utilidades(liMasOpciones)
if resp == "libros":
self.librosConsulta(False)
+
elif resp == "add_line":
numJugadas, nj, fila, siBlancas = self.jugadaActual()
partida = self.partida
@@ -382,6 +487,16 @@ def procesarAccion(self, clave):
self.dbop.updateTrainingEngines()
QTUtil2.mensaje(self.pantalla, _("Done"))
+ elif resp == "auto_analysis":
+ self.auto_analysis = not self.auto_analysis
+ self.trainingEngines["AUTO_ANALYSIS"] = self.auto_analysis
+ self.dbop.setTrainingEngines(self.trainingEngines)
+
+ elif resp == "ask_movesdifferent":
+ self.ask_movesdifferent = not self.ask_movesdifferent
+ self.trainingEngines["ASK_MOVESDIFFERENT"] = self.ask_movesdifferent
+ self.dbop.setTrainingEngines(self.trainingEngines)
+
else:
Gestor.Gestor.rutinaAccionDef(self, clave)
diff --git a/Code/GestorPerson.py b/Code/GestorPerson.py
index aea2165..1262b28 100644
--- a/Code/GestorPerson.py
+++ b/Code/GestorPerson.py
@@ -23,6 +23,7 @@ def inicio(self, dic, aplazamiento=None, siPrimeraJugadaHecha=False):
self.siJuegaHumano = False
self.estado = kJugando
self.timekeeper = Util.Timekeeper()
+ self.siAnalizando = False
self.summary = {}
self.siSummary = dic.get("SUMMARY", False)
diff --git a/Code/GestorRoutes.py b/Code/GestorRoutes.py
index 4aaac48..99ccea9 100644
--- a/Code/GestorRoutes.py
+++ b/Code/GestorRoutes.py
@@ -1,7 +1,7 @@
import random
import time
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Util
from Code import Books
diff --git a/Code/Init.py b/Code/Init.py
index beb2916..bde7492 100644
--- a/Code/Init.py
+++ b/Code/Init.py
@@ -9,7 +9,7 @@
from Code.Constantes import *
DEBUG = False
-VERSION = "11.11"
+VERSION = "11.12a"
if DEBUG:
prlkn("DEBUG " * 20)
diff --git a/Code/Kibitzers.py b/Code/Kibitzers.py
index ef3757e..6394ff7 100644
--- a/Code/Kibitzers.py
+++ b/Code/Kibitzers.py
@@ -308,6 +308,8 @@ def escribe(self, orden):
self.ipc.push(orden.bloqueEnvio())
def siActiva(self):
+ if self.popen is None:
+ return False
return self.popen.poll() is None
def ponFen(self, fen, fenBase):
diff --git a/Code/LibChess.py b/Code/LibChess.py
index ba0d14d..9b2d63d 100644
--- a/Code/LibChess.py
+++ b/Code/LibChess.py
@@ -1,6 +1,6 @@
import random
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
import chess
import chess.syzygy
diff --git a/Code/OpeningGuide.py b/Code/OpeningGuide.py
index b1e773c..cdc00e4 100644
--- a/Code/OpeningGuide.py
+++ b/Code/OpeningGuide.py
@@ -2,7 +2,7 @@
import os
import sqlite3
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import AperturasStd
from Code import Books
diff --git a/Code/OpeningLines.py b/Code/OpeningLines.py
index 20f0b6a..0194f0a 100644
--- a/Code/OpeningLines.py
+++ b/Code/OpeningLines.py
@@ -5,7 +5,7 @@
import datetime
import collections
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Util
from Code import Partida
@@ -204,14 +204,24 @@ def open_cache_engines(self):
if self.db_cache_engines is None:
self.db_cache_engines = Util.DicSQL(self.nomFichero, tabla="CACHE_ENGINES")
- def get_cache_engines(self, engine, ms, fenM2):
- key = "%s-%d-%s" % (engine, ms, fenM2)
+ def get_cache_engines(self, engine, ms, fenM2, depth=None):
+ if depth:
+ key = "%s-%d-%s-%d" % (engine, ms, fenM2, depth)
+ else:
+ key = "%s-%d-%s" % (engine, ms, fenM2)
return self.db_cache_engines[key]
- def set_cache_engines(self, engine, ms, fenM2, move):
- key = "%s-%d-%s" % (engine, ms, fenM2)
+ def set_cache_engines(self, engine, ms, fenM2, move, depth=None):
+ if depth:
+ key = "%s-%d-%s-%d" % (engine, ms, fenM2, depth)
+ else:
+ key = "%s-%d-%s" % (engine, ms, fenM2)
self.db_cache_engines[key] = move
+ def reinit_cache_engines(self):
+ self.open_cache_engines()
+ self.db_cache_engines.deleteall()
+
def init_database(self):
cursor = self._conexion.cursor()
cursor.execute("pragma table_info(LINES)")
@@ -435,6 +445,7 @@ def createTrainingEngines(self, reg, procesador):
lo = ListaOpenings(procesador.configuracion)
lo.add_training_engines_file(os.path.basename(self.nomFichero))
+ self.reinit_cache_engines()
def withTrainings(self):
return "TRAINING" in self.db_config
@@ -928,7 +939,6 @@ def hazFEN(fen, lipv_ant, control):
control.liPartidas = []
control.with_history = False
-
control = Util.Almacen()
control.liPartidas = []
control.num_partidas = 0
diff --git a/Code/PGNreader.py b/Code/PGNreader.py
index 4ed6ea7..849564f 100644
--- a/Code/PGNreader.py
+++ b/Code/PGNreader.py
@@ -1,4 +1,4 @@
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Util
diff --git a/Code/Partida.py b/Code/Partida.py
index 6055114..aa4b03f 100644
--- a/Code/Partida.py
+++ b/Code/Partida.py
@@ -1,4 +1,4 @@
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Util
from Code import VarGen
from Code import ControlPosicion
@@ -671,6 +671,14 @@ def resetFEN(self, fen):
self.liTags.append(("FEN", fen))
Partida.resetFEN(self, fen)
+ def titulo(self, litags):
+ li = []
+ for key in litags:
+ tag = self.getTAG(key)
+ if tag:
+ li.append(tag)
+ return "-".join(li)
+
# firstLG = [True]
diff --git a/Code/Presentacion.py b/Code/Presentacion.py
index 4cd4e7e..31de9c5 100644
--- a/Code/Presentacion.py
+++ b/Code/Presentacion.py
@@ -2,7 +2,7 @@
import time
import codecs
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Util
from Code import ControlPosicion
diff --git a/Code/Procesador.py b/Code/Procesador.py
index 6554a73..3a4f012 100644
--- a/Code/Procesador.py
+++ b/Code/Procesador.py
@@ -6,6 +6,7 @@
from Code import AperturasStd
from Code import Routes
from Code import VarGen
+from Code import Everest
from Code import XGestorMotor
from Code.Constantes import *
@@ -35,11 +36,13 @@
from Code import OpeningLines
from Code import GestorWashing
from Code import GestorPlayPGN
+from Code import GestorAnotar
from Code.QT import DatosNueva, BasicMenus
from Code.QT import Iconos
from Code.QT import Info
from Code.QT import Pantalla
from Code.QT import PantallaAlbumes
+from Code.QT import PantallaAnotar
from Code.QT import PantallaAperturas
from Code.QT import PantallaBMT
from Code.QT import PantallaColores
@@ -691,6 +694,18 @@ def externBMT(self, fichero):
self.configuracion.ficheroBMT = fichero
PantallaBMT.pantallaBMT(self)
+ def anotar(self, partidacompleta, siblancasabajo):
+ self.gestor = GestorAnotar.GestorAnotar(self)
+ self.gestor.inicio(partidacompleta, siblancasabajo)
+
+ def show_anotar(self):
+ w = PantallaAnotar.WAnotar(self)
+ if w.exec_():
+ pc, siblancasabajo = w.resultado
+ if pc is None:
+ pc = Everest.get_partida_random()
+ self.anotar(pc, siblancasabajo)
+
def externDatabase(self, fichero):
self.configuracion.ficheroDBgames = fichero
self.database()
diff --git a/Code/QT/Iconos.py b/Code/QT/Iconos.py
index 65cff82..15ce56e 100644
--- a/Code/QT/Iconos.py
+++ b/Code/QT/Iconos.py
@@ -5,2456 +5,3281 @@
binIconos = f.read()
f.close()
+
def icono(name):
return eval( "%s()"%name )
+
def pixmap(name):
return eval( "pm%s()"%name )
+
def PM(desde, hasta):
pm = QtGui.QPixmap()
pm.loadFromData( binIconos[desde:hasta] )
return pm
+
def pmLM():
return PM(0,1248)
+
def LM():
return QtGui.QIcon(pmLM())
+
def pmAplicacion():
return PM(1248,2025)
+
def Aplicacion():
return QtGui.QIcon(pmAplicacion())
+
def pmAplicacion64():
return PM(2025,6294)
+
def Aplicacion64():
return QtGui.QIcon(pmAplicacion64())
+
def pmDatos():
return PM(6294,7481)
+
def Datos():
return QtGui.QIcon(pmDatos())
+
def pmTutor():
return PM(7481,9510)
+
def Tutor():
return QtGui.QIcon(pmTutor())
+
def pmTablero():
return PM(6294,7481)
+
def Tablero():
return QtGui.QIcon(pmTablero())
+
def pmPartidaOriginal():
return PM(9510,11487)
+
def PartidaOriginal():
return QtGui.QIcon(pmPartidaOriginal())
+
def pmDGT():
return PM(11487,12481)
+
def DGT():
return QtGui.QIcon(pmDGT())
+
def pmZonaPrincipiantes():
return PM(12481,14515)
+
def ZonaPrincipiantes():
return QtGui.QIcon(pmZonaPrincipiantes())
+
def pmJ60():
return PM(14515,16111)
+
def J60():
return QtGui.QIcon(pmJ60())
+
def pmTamTablero():
return PM(14515,16111)
+
def TamTablero():
return QtGui.QIcon(pmTamTablero())
+
def pmMensEspera():
return PM(16111,23085)
+
def MensEspera():
return QtGui.QIcon(pmMensEspera())
+
def pmUtilidades():
return PM(23085,29514)
+
def Utilidades():
return QtGui.QIcon(pmUtilidades())
+
def pmTerminar():
return PM(29514,31264)
+
def Terminar():
return QtGui.QIcon(pmTerminar())
+
def pmNuevaPartida():
return PM(31264,33012)
+
def NuevaPartida():
return QtGui.QIcon(pmNuevaPartida())
+
def pmOpciones():
return PM(33012,34740)
+
def Opciones():
return QtGui.QIcon(pmOpciones())
+
def pmEntrenamiento():
return PM(7481,9510)
+
def Entrenamiento():
return QtGui.QIcon(pmEntrenamiento())
+
def pmAplazar():
return PM(34740,37807)
+
def Aplazar():
return QtGui.QIcon(pmAplazar())
+
def pmCapturas():
return PM(37807,39848)
+
def Capturas():
return QtGui.QIcon(pmCapturas())
+
def pmReiniciar():
return PM(39848,42142)
+
def Reiniciar():
return QtGui.QIcon(pmReiniciar())
+
def pmMotores():
return PM(42142,48041)
+
def Motores():
return QtGui.QIcon(pmMotores())
+
def pmImportarGM():
return PM(48041,50641)
+
def ImportarGM():
return QtGui.QIcon(pmImportarGM())
+
def pmAbandonar():
return PM(50641,54641)
+
def Abandonar():
return QtGui.QIcon(pmAbandonar())
+
def pmEmpezar():
return PM(54641,56677)
+
def Empezar():
return QtGui.QIcon(pmEmpezar())
+
def pmOtros():
return PM(56677,61147)
+
def Otros():
return QtGui.QIcon(pmOtros())
+
def pmAnalizar():
return PM(61147,62684)
+
def Analizar():
return QtGui.QIcon(pmAnalizar())
+
def pmMainMenu():
return PM(62684,66994)
+
def MainMenu():
return QtGui.QIcon(pmMainMenu())
+
def pmFinPartida():
return PM(66994,69942)
+
def FinPartida():
return QtGui.QIcon(pmFinPartida())
+
def pmGrabar():
return PM(69942,71405)
+
def Grabar():
return QtGui.QIcon(pmGrabar())
+
def pmGrabarComo():
return PM(71405,73457)
+
def GrabarComo():
return QtGui.QIcon(pmGrabarComo())
+
def pmRecuperar():
return PM(73457,76215)
+
def Recuperar():
return QtGui.QIcon(pmRecuperar())
+
def pmInformacion():
return PM(76215,78174)
+
def Informacion():
return QtGui.QIcon(pmInformacion())
+
def pmNuevo():
return PM(78174,78928)
+
def Nuevo():
return QtGui.QIcon(pmNuevo())
+
def pmCopiar():
return PM(78928,80109)
+
def Copiar():
return QtGui.QIcon(pmCopiar())
+
def pmModificar():
return PM(80109,84506)
+
def Modificar():
return QtGui.QIcon(pmModificar())
+
def pmBorrar():
return PM(84506,89497)
+
def Borrar():
return QtGui.QIcon(pmBorrar())
+
def pmMarcar():
return PM(89497,94426)
+
def Marcar():
return QtGui.QIcon(pmMarcar())
+
def pmPegar():
return PM(94426,96737)
+
def Pegar():
return QtGui.QIcon(pmPegar())
+
def pmFichero():
return PM(96737,101422)
+
def Fichero():
return QtGui.QIcon(pmFichero())
+
def pmNuestroFichero():
return PM(101422,104469)
+
def NuestroFichero():
return QtGui.QIcon(pmNuestroFichero())
+
def pmFicheroRepite():
return PM(104469,105965)
+
def FicheroRepite():
return QtGui.QIcon(pmFicheroRepite())
+
def pmInformacionPGN():
return PM(105965,106983)
+
def InformacionPGN():
return QtGui.QIcon(pmInformacionPGN())
+
def pmVer():
return PM(106983,108437)
+
def Ver():
return QtGui.QIcon(pmVer())
+
def pmInicio():
return PM(108437,110451)
+
def Inicio():
return QtGui.QIcon(pmInicio())
+
def pmFinal():
return PM(110451,112445)
+
def Final():
return QtGui.QIcon(pmFinal())
+
def pmFiltrar():
return PM(112445,118935)
+
def Filtrar():
return QtGui.QIcon(pmFiltrar())
+
def pmArriba():
return PM(118935,121088)
+
def Arriba():
return QtGui.QIcon(pmArriba())
+
def pmAbajo():
return PM(121088,123196)
+
def Abajo():
return QtGui.QIcon(pmAbajo())
+
def pmEstadisticas():
return PM(123196,125335)
+
def Estadisticas():
return QtGui.QIcon(pmEstadisticas())
+
def pmRendirse():
return PM(125335,129181)
+
def Rendirse():
return QtGui.QIcon(pmRendirse())
+
def pmCheck():
return PM(129181,132405)
+
def Check():
return QtGui.QIcon(pmCheck())
+
def pmTablas():
return PM(132405,134028)
+
def Tablas():
return QtGui.QIcon(pmTablas())
+
def pmAtras():
return PM(134028,135547)
+
def Atras():
return QtGui.QIcon(pmAtras())
+
def pmBuscar():
return PM(135547,137532)
+
def Buscar():
return QtGui.QIcon(pmBuscar())
+
def pmLibros():
return PM(137532,139660)
+
def Libros():
return QtGui.QIcon(pmLibros())
+
def pmAceptar():
return PM(139660,143007)
+
def Aceptar():
return QtGui.QIcon(pmAceptar())
+
def pmCancelar():
return PM(143007,144990)
+
def Cancelar():
return QtGui.QIcon(pmCancelar())
+
def pmDefecto():
return PM(144990,148309)
+
def Defecto():
return QtGui.QIcon(pmDefecto())
+
def pmGenerar():
return PM(148309,151525)
+
def Generar():
return QtGui.QIcon(pmGenerar())
+
def pmInsertar():
return PM(151525,153921)
+
def Insertar():
return QtGui.QIcon(pmInsertar())
+
def pmJugar():
return PM(153921,156130)
+
def Jugar():
return QtGui.QIcon(pmJugar())
+
def pmConfigurar():
return PM(156130,159214)
+
def Configurar():
return QtGui.QIcon(pmConfigurar())
+
def pmS_Aceptar():
return PM(139660,143007)
+
def S_Aceptar():
return QtGui.QIcon(pmS_Aceptar())
+
def pmS_Cancelar():
return PM(143007,144990)
+
def S_Cancelar():
return QtGui.QIcon(pmS_Cancelar())
+
def pmS_Microfono():
return PM(159214,164655)
+
def S_Microfono():
return QtGui.QIcon(pmS_Microfono())
+
def pmS_LeerWav():
return PM(48041,50641)
+
def S_LeerWav():
return QtGui.QIcon(pmS_LeerWav())
+
def pmS_Play():
return PM(164655,169993)
+
def S_Play():
return QtGui.QIcon(pmS_Play())
+
def pmS_StopPlay():
return PM(169993,170603)
+
def S_StopPlay():
return QtGui.QIcon(pmS_StopPlay())
+
def pmS_StopMicrofono():
return PM(169993,170603)
+
def S_StopMicrofono():
return QtGui.QIcon(pmS_StopMicrofono())
+
def pmS_Record():
return PM(170603,173836)
+
def S_Record():
return QtGui.QIcon(pmS_Record())
+
def pmS_Limpiar():
return PM(84506,89497)
+
def S_Limpiar():
return QtGui.QIcon(pmS_Limpiar())
+
def pmHistorial():
return PM(173836,175099)
+
def Historial():
return QtGui.QIcon(pmHistorial())
+
def pmPegar16():
return PM(175099,176093)
+
def Pegar16():
return QtGui.QIcon(pmPegar16())
+
def pmRivalesMP():
return PM(176093,177219)
+
def RivalesMP():
return QtGui.QIcon(pmRivalesMP())
+
def pmCamara():
return PM(177219,178741)
+
def Camara():
return QtGui.QIcon(pmCamara())
+
def pmUsuarios():
return PM(178741,179981)
+
def Usuarios():
return QtGui.QIcon(pmUsuarios())
+
def pmResistencia():
return PM(179981,183043)
+
def Resistencia():
return QtGui.QIcon(pmResistencia())
+
def pmRemoto():
return PM(183043,187165)
+
def Remoto():
return QtGui.QIcon(pmRemoto())
+
def pmRemotoServidor():
return PM(187165,188189)
+
def RemotoServidor():
return QtGui.QIcon(pmRemotoServidor())
+
def pmRemotoCliente():
return PM(188189,189433)
+
def RemotoCliente():
return QtGui.QIcon(pmRemotoCliente())
+
def pmCebra():
return PM(189433,191886)
+
def Cebra():
return QtGui.QIcon(pmCebra())
+
def pmGafas():
return PM(191886,192870)
+
def Gafas():
return QtGui.QIcon(pmGafas())
+
def pmPuente():
return PM(192870,193506)
+
def Puente():
return QtGui.QIcon(pmPuente())
+
def pmWeb():
return PM(193506,194688)
+
def Web():
return QtGui.QIcon(pmWeb())
+
def pmMail():
return PM(194688,195648)
+
def Mail():
return QtGui.QIcon(pmMail())
+
def pmAyuda():
return PM(195648,196829)
+
def Ayuda():
return QtGui.QIcon(pmAyuda())
+
def pmFAQ():
return PM(196829,198150)
+
def FAQ():
return QtGui.QIcon(pmFAQ())
+
def pmPuntuacion():
return PM(198150,199078)
+
def Puntuacion():
return QtGui.QIcon(pmPuntuacion())
+
def pmActualiza():
return PM(199078,199944)
+
def Actualiza():
return QtGui.QIcon(pmActualiza())
+
def pmRefresh():
return PM(199944,202336)
+
def Refresh():
return QtGui.QIcon(pmRefresh())
+
def pmJuegaSolo():
return PM(202336,203518)
+
def JuegaSolo():
return QtGui.QIcon(pmJuegaSolo())
+
def pmPlayer():
return PM(202336,203518)
+
def Player():
return QtGui.QIcon(pmPlayer())
+
def pmJS_Rotacion():
return PM(203518,205428)
+
def JS_Rotacion():
return QtGui.QIcon(pmJS_Rotacion())
+
def pmCoordina():
return PM(203518,205428)
+
def Coordina():
return QtGui.QIcon(pmCoordina())
+
def pmEstrellaAzul():
return PM(205428,206934)
+
def EstrellaAzul():
return QtGui.QIcon(pmEstrellaAzul())
+
def pmElo():
return PM(205428,206934)
+
def Elo():
return QtGui.QIcon(pmElo())
+
def pmMate():
return PM(206934,207495)
+
def Mate():
return QtGui.QIcon(pmMate())
+
def pmEloTimed():
return PM(207495,208979)
+
def EloTimed():
return QtGui.QIcon(pmEloTimed())
+
def pmPGN():
return PM(208979,210977)
+
def PGN():
return QtGui.QIcon(pmPGN())
+
def pmPGN_Importar():
return PM(210977,212567)
+
def PGN_Importar():
return QtGui.QIcon(pmPGN_Importar())
+
def pmAyudaGR():
return PM(212567,218445)
+
def AyudaGR():
return QtGui.QIcon(pmAyudaGR())
+
def pmBotonAyuda():
return PM(218445,220905)
+
def BotonAyuda():
return QtGui.QIcon(pmBotonAyuda())
+
def pmColores():
return PM(220905,222136)
+
def Colores():
return QtGui.QIcon(pmColores())
+
def pmEditarColores():
return PM(222136,224439)
+
def EditarColores():
return QtGui.QIcon(pmEditarColores())
+
def pmGranMaestro():
return PM(224439,225295)
+
def GranMaestro():
return QtGui.QIcon(pmGranMaestro())
+
def pmWGranMaestro():
return PM(225295,225754)
+
def WGranMaestro():
return QtGui.QIcon(pmWGranMaestro())
+
def pmFavoritos():
return PM(225754,227520)
+
def Favoritos():
return QtGui.QIcon(pmFavoritos())
+
def pmCarpeta():
return PM(227520,228224)
+
def Carpeta():
return QtGui.QIcon(pmCarpeta())
+
def pmDivision():
return PM(228224,228889)
+
def Division():
return QtGui.QIcon(pmDivision())
+
def pmDivisionF():
return PM(228889,230003)
+
def DivisionF():
return QtGui.QIcon(pmDivisionF())
+
def pmKibitzer():
return PM(230003,230542)
+
def Kibitzer():
return QtGui.QIcon(pmKibitzer())
+
def pmKibitzer_Pausa():
return PM(230542,231406)
+
def Kibitzer_Pausa():
return QtGui.QIcon(pmKibitzer_Pausa())
+
def pmKibitzer_Continuar():
return PM(231406,232237)
+
def Kibitzer_Continuar():
return QtGui.QIcon(pmKibitzer_Continuar())
+
def pmKibitzer_Terminar():
return PM(232237,233161)
+
def Kibitzer_Terminar():
return QtGui.QIcon(pmKibitzer_Terminar())
+
def pmDelete():
return PM(232237,233161)
+
def Delete():
return QtGui.QIcon(pmDelete())
+
def pmModificarP():
return PM(233161,234227)
+
def ModificarP():
return QtGui.QIcon(pmModificarP())
+
def pmGrupo_Si():
return PM(234227,234689)
+
def Grupo_Si():
return QtGui.QIcon(pmGrupo_Si())
+
def pmGrupo_No():
return PM(234689,235012)
+
def Grupo_No():
return QtGui.QIcon(pmGrupo_No())
+
def pmMotor_Si():
return PM(235012,235474)
+
def Motor_Si():
return QtGui.QIcon(pmMotor_Si())
+
def pmMotor_No():
return PM(232237,233161)
+
def Motor_No():
return QtGui.QIcon(pmMotor_No())
+
def pmMotor_Actual():
return PM(235474,236491)
+
def Motor_Actual():
return QtGui.QIcon(pmMotor_Actual())
+
def pmMotor():
return PM(236491,237118)
+
def Motor():
return QtGui.QIcon(pmMotor())
+
def pmMoverInicio():
return PM(237118,237971)
+
def MoverInicio():
return QtGui.QIcon(pmMoverInicio())
+
def pmMoverFinal():
return PM(237971,238847)
+
def MoverFinal():
return QtGui.QIcon(pmMoverFinal())
+
def pmMoverAdelante():
return PM(238847,239708)
+
def MoverAdelante():
return QtGui.QIcon(pmMoverAdelante())
+
def pmMoverAtras():
return PM(239708,240576)
+
def MoverAtras():
return QtGui.QIcon(pmMoverAtras())
+
def pmMoverLibre():
return PM(240576,241396)
+
def MoverLibre():
return QtGui.QIcon(pmMoverLibre())
+
def pmMoverTiempo():
return PM(241396,242589)
+
def MoverTiempo():
return QtGui.QIcon(pmMoverTiempo())
+
def pmMoverMas():
return PM(242589,243628)
+
def MoverMas():
return QtGui.QIcon(pmMoverMas())
+
def pmMoverGrabar():
return PM(243628,244484)
+
def MoverGrabar():
return QtGui.QIcon(pmMoverGrabar())
+
def pmMoverGrabarTodos():
return PM(244484,245528)
+
def MoverGrabarTodos():
return QtGui.QIcon(pmMoverGrabarTodos())
+
def pmMoverJugar():
return PM(231406,232237)
+
def MoverJugar():
return QtGui.QIcon(pmMoverJugar())
+
def pmPelicula():
return PM(245528,247662)
+
def Pelicula():
return QtGui.QIcon(pmPelicula())
+
def pmPelicula_Pausa():
return PM(247662,249421)
+
def Pelicula_Pausa():
return QtGui.QIcon(pmPelicula_Pausa())
+
def pmPelicula_Seguir():
return PM(249421,251510)
+
def Pelicula_Seguir():
return QtGui.QIcon(pmPelicula_Seguir())
+
def pmPelicula_Rapido():
return PM(251510,253569)
+
def Pelicula_Rapido():
return QtGui.QIcon(pmPelicula_Rapido())
+
def pmPelicula_Lento():
return PM(253569,255444)
+
def Pelicula_Lento():
return QtGui.QIcon(pmPelicula_Lento())
+
def pmPelicula_Repetir():
return PM(39848,42142)
+
def Pelicula_Repetir():
return QtGui.QIcon(pmPelicula_Repetir())
+
def pmPelicula_PGN():
return PM(255444,256352)
+
def Pelicula_PGN():
return QtGui.QIcon(pmPelicula_PGN())
+
def pmMemoria():
return PM(256352,258293)
+
def Memoria():
return QtGui.QIcon(pmMemoria())
+
def pmEntrenar():
return PM(258293,259832)
+
def Entrenar():
return QtGui.QIcon(pmEntrenar())
+
def pmEnviar():
return PM(258293,259832)
+
def Enviar():
return QtGui.QIcon(pmEnviar())
+
def pmTrasteros():
return PM(259832,264635)
+
def Trasteros():
return QtGui.QIcon(pmTrasteros())
+
def pmTrastero():
return PM(264635,265097)
+
def Trastero():
return QtGui.QIcon(pmTrastero())
+
def pmTrastero_Quitar():
return PM(232237,233161)
+
def Trastero_Quitar():
return QtGui.QIcon(pmTrastero_Quitar())
+
def pmTrastero_Nuevo():
return PM(265097,266605)
+
def Trastero_Nuevo():
return QtGui.QIcon(pmTrastero_Nuevo())
+
def pmNuevoMas():
return PM(265097,266605)
+
def NuevoMas():
return QtGui.QIcon(pmNuevoMas())
+
def pmTemas():
return PM(266605,268828)
+
def Temas():
return QtGui.QIcon(pmTemas())
+
def pmTutorialesCrear():
return PM(268828,275097)
+
def TutorialesCrear():
return QtGui.QIcon(pmTutorialesCrear())
+
def pmMover():
return PM(275097,275679)
+
def Mover():
return QtGui.QIcon(pmMover())
+
def pmSeleccionado():
return PM(275097,275679)
+
def Seleccionado():
return QtGui.QIcon(pmSeleccionado())
+
def pmSeleccionar():
return PM(275679,281383)
+
def Seleccionar():
return QtGui.QIcon(pmSeleccionar())
+
def pmVista():
return PM(281383,283307)
+
def Vista():
return QtGui.QIcon(pmVista())
+
def pmInformacionPGNUno():
return PM(283307,284685)
+
def InformacionPGNUno():
return QtGui.QIcon(pmInformacionPGNUno())
+
def pmDailyTest():
return PM(284685,287025)
+
def DailyTest():
return QtGui.QIcon(pmDailyTest())
+
def pmJuegaPorMi():
return PM(287025,288745)
+
def JuegaPorMi():
return QtGui.QIcon(pmJuegaPorMi())
+
def pmArbol():
return PM(288745,289379)
+
def Arbol():
return QtGui.QIcon(pmArbol())
+
def pmGrabarFichero():
return PM(69942,71405)
+
def GrabarFichero():
return QtGui.QIcon(pmGrabarFichero())
+
def pmClip():
return PM(289379,291525)
+
def Clip():
return QtGui.QIcon(pmClip())
+
def pmFics():
return PM(291525,291942)
+
def Fics():
return QtGui.QIcon(pmFics())
+
def pmFide():
return PM(9510,11487)
+
def Fide():
return QtGui.QIcon(pmFide())
+
def pmFichPGN():
return PM(9510,11487)
+
def FichPGN():
return QtGui.QIcon(pmFichPGN())
+
def pmFlechas():
return PM(291942,295294)
+
def Flechas():
return QtGui.QIcon(pmFlechas())
+
def pmMarcos():
return PM(295294,296741)
+
def Marcos():
return QtGui.QIcon(pmMarcos())
+
def pmSVGs():
return PM(296741,300310)
+
def SVGs():
return QtGui.QIcon(pmSVGs())
+
def pmAmarillo():
return PM(300310,301562)
+
def Amarillo():
return QtGui.QIcon(pmAmarillo())
+
def pmNaranja():
return PM(301562,302794)
+
def Naranja():
return QtGui.QIcon(pmNaranja())
+
def pmVerde():
return PM(302794,304070)
+
def Verde():
return QtGui.QIcon(pmVerde())
+
def pmAzul():
return PM(304070,305158)
+
def Azul():
return QtGui.QIcon(pmAzul())
+
def pmMagenta():
return PM(305158,306446)
+
def Magenta():
return QtGui.QIcon(pmMagenta())
+
def pmRojo():
return PM(306446,307665)
+
def Rojo():
return QtGui.QIcon(pmRojo())
+
def pmGris():
return PM(307665,308623)
+
def Gris():
return QtGui.QIcon(pmGris())
+
def pmEstrella():
return PM(198150,199078)
+
def Estrella():
return QtGui.QIcon(pmEstrella())
+
def pmAmarillo32():
return PM(308623,310603)
+
def Amarillo32():
return QtGui.QIcon(pmAmarillo32())
+
def pmNaranja32():
return PM(310603,312727)
+
def Naranja32():
return QtGui.QIcon(pmNaranja32())
+
def pmVerde32():
return PM(312727,314848)
+
def Verde32():
return QtGui.QIcon(pmVerde32())
+
def pmAzul32():
return PM(314848,317227)
+
def Azul32():
return QtGui.QIcon(pmAzul32())
+
def pmMagenta32():
return PM(317227,319678)
+
def Magenta32():
return QtGui.QIcon(pmMagenta32())
+
def pmRojo32():
return PM(319678,321493)
+
def Rojo32():
return QtGui.QIcon(pmRojo32())
+
def pmGris32():
return PM(321493,323407)
+
def Gris32():
return QtGui.QIcon(pmGris32())
+
def pmPuntoBlanco():
return PM(323407,323756)
+
def PuntoBlanco():
return QtGui.QIcon(pmPuntoBlanco())
+
def pmPuntoAmarillo():
return PM(234227,234689)
+
def PuntoAmarillo():
return QtGui.QIcon(pmPuntoAmarillo())
+
def pmPuntoNaranja():
return PM(323756,324218)
+
def PuntoNaranja():
return QtGui.QIcon(pmPuntoNaranja())
+
def pmPuntoVerde():
return PM(235012,235474)
+
def PuntoVerde():
return QtGui.QIcon(pmPuntoVerde())
+
def pmPuntoAzul():
return PM(264635,265097)
+
def PuntoAzul():
return QtGui.QIcon(pmPuntoAzul())
+
def pmPuntoMagenta():
return PM(324218,324717)
+
def PuntoMagenta():
return QtGui.QIcon(pmPuntoMagenta())
+
def pmPuntoRojo():
return PM(324717,325216)
+
def PuntoRojo():
return QtGui.QIcon(pmPuntoRojo())
+
def pmPuntoNegro():
return PM(234689,235012)
+
def PuntoNegro():
return QtGui.QIcon(pmPuntoNegro())
+
def pmPuntoEstrella():
return PM(325216,325643)
+
def PuntoEstrella():
return QtGui.QIcon(pmPuntoEstrella())
+
def pmComentario():
return PM(325643,326280)
+
def Comentario():
return QtGui.QIcon(pmComentario())
+
def pmComentarioMas():
return PM(326280,327219)
+
def ComentarioMas():
return QtGui.QIcon(pmComentarioMas())
+
def pmComentarioEditar():
return PM(243628,244484)
+
def ComentarioEditar():
return QtGui.QIcon(pmComentarioEditar())
+
def pmApertura():
return PM(327219,328185)
+
def Apertura():
return QtGui.QIcon(pmApertura())
+
def pmAperturaComentario():
return PM(328185,329181)
+
def AperturaComentario():
return QtGui.QIcon(pmAperturaComentario())
+
def pmBookGuide():
return PM(329181,330058)
+
def BookGuide():
return QtGui.QIcon(pmBookGuide())
+
def pmMas():
return PM(330058,330567)
+
def Mas():
return QtGui.QIcon(pmMas())
+
def pmMasR():
return PM(330567,331055)
+
def MasR():
return QtGui.QIcon(pmMasR())
+
def pmMasDoc():
return PM(331055,331856)
+
def MasDoc():
return QtGui.QIcon(pmMasDoc())
+
def pmNuevaDB():
return PM(331856,336490)
+
def NuevaDB():
return QtGui.QIcon(pmNuevaDB())
+
def pmPotencia():
return PM(199078,199944)
+
def Potencia():
return QtGui.QIcon(pmPotencia())
+
def pmSorpresa():
return PM(336490,337549)
+
def Sorpresa():
return QtGui.QIcon(pmSorpresa())
+
def pmSonrisa():
return PM(337549,338631)
+
def Sonrisa():
return QtGui.QIcon(pmSonrisa())
+
def pmBMT():
return PM(338631,339509)
+
def BMT():
return QtGui.QIcon(pmBMT())
+
def pmCorazon():
return PM(339509,341387)
+
def Corazon():
return QtGui.QIcon(pmCorazon())
+
def pmOjo():
return PM(341387,342509)
+
def Ojo():
return QtGui.QIcon(pmOjo())
+
def pmOcultar():
return PM(341387,342509)
+
def Ocultar():
return QtGui.QIcon(pmOcultar())
+
def pmMostrar():
return PM(342509,343565)
+
def Mostrar():
return QtGui.QIcon(pmMostrar())
+
def pmBlog():
return PM(343565,344087)
+
def Blog():
return QtGui.QIcon(pmBlog())
+
def pmVariantes():
return PM(344087,344994)
+
def Variantes():
return QtGui.QIcon(pmVariantes())
+
def pmVariantesG():
return PM(344994,347421)
+
def VariantesG():
return QtGui.QIcon(pmVariantesG())
+
def pmCambiar():
return PM(347421,349135)
+
def Cambiar():
return QtGui.QIcon(pmCambiar())
+
def pmAnterior():
return PM(349135,351189)
+
def Anterior():
return QtGui.QIcon(pmAnterior())
+
def pmSiguiente():
return PM(351189,353259)
+
def Siguiente():
return QtGui.QIcon(pmSiguiente())
+
def pmSiguienteF():
return PM(353259,355434)
+
def SiguienteF():
return QtGui.QIcon(pmSiguienteF())
+
def pmAnteriorF():
return PM(355434,357628)
+
def AnteriorF():
return QtGui.QIcon(pmAnteriorF())
+
def pmX():
return PM(357628,358910)
+
def X():
return QtGui.QIcon(pmX())
+
def pmTools():
return PM(358910,361511)
+
def Tools():
return QtGui.QIcon(pmTools())
+
def pmTacticas():
return PM(361511,364084)
+
def Tacticas():
return QtGui.QIcon(pmTacticas())
+
def pmCancelarPeque():
return PM(364084,364945)
+
def CancelarPeque():
return QtGui.QIcon(pmCancelarPeque())
+
def pmAceptarPeque():
return PM(235474,236491)
+
def AceptarPeque():
return QtGui.QIcon(pmAceptarPeque())
+
def pmP_16c():
return PM(364945,365469)
+
def P_16c():
return QtGui.QIcon(pmP_16c())
+
def pmLibre():
return PM(365469,367861)
+
def Libre():
return QtGui.QIcon(pmLibre())
+
def pmEnBlanco():
return PM(367861,368587)
+
def EnBlanco():
return QtGui.QIcon(pmEnBlanco())
+
def pmDirector():
return PM(368587,371561)
+
def Director():
return QtGui.QIcon(pmDirector())
+
def pmTorneos():
return PM(371561,373299)
+
def Torneos():
return QtGui.QIcon(pmTorneos())
+
def pmAperturas():
return PM(373299,374224)
+
def Aperturas():
return QtGui.QIcon(pmAperturas())
+
def pmV_Blancas():
return PM(374224,374504)
+
def V_Blancas():
return QtGui.QIcon(pmV_Blancas())
+
def pmV_Blancas_Mas():
return PM(374504,374784)
+
def V_Blancas_Mas():
return QtGui.QIcon(pmV_Blancas_Mas())
+
def pmV_Blancas_Mas_Mas():
return PM(374784,375056)
+
def V_Blancas_Mas_Mas():
return QtGui.QIcon(pmV_Blancas_Mas_Mas())
+
def pmV_Negras():
return PM(375056,375331)
+
def V_Negras():
return QtGui.QIcon(pmV_Negras())
+
def pmV_Negras_Mas():
return PM(375331,375606)
+
def V_Negras_Mas():
return QtGui.QIcon(pmV_Negras_Mas())
+
def pmV_Negras_Mas_Mas():
return PM(375606,375875)
+
def V_Negras_Mas_Mas():
return QtGui.QIcon(pmV_Negras_Mas_Mas())
+
def pmV_Blancas_Igual_Negras():
return PM(375875,376177)
+
def V_Blancas_Igual_Negras():
return QtGui.QIcon(pmV_Blancas_Igual_Negras())
+
def pmMezclar():
return PM(151525,153921)
+
def Mezclar():
return QtGui.QIcon(pmMezclar())
+
def pmVoyager():
return PM(376177,378139)
+
def Voyager():
return QtGui.QIcon(pmVoyager())
+
def pmReindexar():
return PM(378139,379956)
+
def Reindexar():
return QtGui.QIcon(pmReindexar())
+
def pmRename():
return PM(379956,380940)
+
def Rename():
return QtGui.QIcon(pmRename())
+
def pmAdd():
return PM(380940,381893)
+
def Add():
return QtGui.QIcon(pmAdd())
+
def pmMas22():
return PM(381893,382557)
+
def Mas22():
return QtGui.QIcon(pmMas22())
+
def pmMenos22():
return PM(382557,383001)
+
def Menos22():
return QtGui.QIcon(pmMenos22())
+
def pmTransposition():
return PM(383001,383520)
+
def Transposition():
return QtGui.QIcon(pmTransposition())
+
def pmRat():
return PM(383520,389224)
+
def Rat():
return QtGui.QIcon(pmRat())
+
def pmAlligator():
return PM(389224,394216)
+
def Alligator():
return QtGui.QIcon(pmAlligator())
+
def pmAnt():
return PM(394216,400914)
+
def Ant():
return QtGui.QIcon(pmAnt())
+
def pmBat():
return PM(400914,403868)
+
def Bat():
return QtGui.QIcon(pmBat())
+
def pmBear():
return PM(403868,411147)
+
def Bear():
return QtGui.QIcon(pmBear())
+
def pmBee():
return PM(411147,416149)
+
def Bee():
return QtGui.QIcon(pmBee())
+
def pmBird():
return PM(416149,422208)
+
def Bird():
return QtGui.QIcon(pmBird())
+
def pmBull():
return PM(422208,429177)
+
def Bull():
return QtGui.QIcon(pmBull())
+
def pmBulldog():
return PM(429177,436068)
+
def Bulldog():
return QtGui.QIcon(pmBulldog())
+
def pmButterfly():
return PM(436068,443442)
+
def Butterfly():
return QtGui.QIcon(pmButterfly())
+
def pmCat():
return PM(443442,449714)
+
def Cat():
return QtGui.QIcon(pmCat())
+
def pmChicken():
return PM(449714,455525)
+
def Chicken():
return QtGui.QIcon(pmChicken())
+
def pmCow():
return PM(455525,462268)
+
def Cow():
return QtGui.QIcon(pmCow())
+
def pmCrab():
return PM(462268,467857)
+
def Crab():
return QtGui.QIcon(pmCrab())
+
def pmCrocodile():
return PM(467857,473998)
+
def Crocodile():
return QtGui.QIcon(pmCrocodile())
+
def pmDeer():
return PM(473998,480305)
+
def Deer():
return QtGui.QIcon(pmDeer())
+
def pmDog():
return PM(480305,486908)
+
def Dog():
return QtGui.QIcon(pmDog())
+
def pmDonkey():
return PM(486908,492555)
+
def Donkey():
return QtGui.QIcon(pmDonkey())
+
def pmDuck():
return PM(492555,499098)
+
def Duck():
return QtGui.QIcon(pmDuck())
+
def pmEagle():
return PM(499098,503916)
+
def Eagle():
return QtGui.QIcon(pmEagle())
+
def pmElephant():
return PM(503916,510397)
+
def Elephant():
return QtGui.QIcon(pmElephant())
+
def pmFish():
return PM(510397,517238)
+
def Fish():
return QtGui.QIcon(pmFish())
+
def pmFox():
return PM(517238,524021)
+
def Fox():
return QtGui.QIcon(pmFox())
+
def pmFrog():
return PM(524021,530437)
+
def Frog():
return QtGui.QIcon(pmFrog())
+
def pmGiraffe():
return PM(530437,537615)
+
def Giraffe():
return QtGui.QIcon(pmGiraffe())
+
def pmGorilla():
return PM(537615,544154)
+
def Gorilla():
return QtGui.QIcon(pmGorilla())
+
def pmHippo():
return PM(544154,551275)
+
def Hippo():
return QtGui.QIcon(pmHippo())
+
def pmHorse():
return PM(551275,557822)
+
def Horse():
return QtGui.QIcon(pmHorse())
+
def pmInsect():
return PM(557822,563757)
+
def Insect():
return QtGui.QIcon(pmInsect())
+
def pmLion():
return PM(563757,572667)
+
def Lion():
return QtGui.QIcon(pmLion())
+
def pmMonkey():
return PM(572667,580346)
+
def Monkey():
return QtGui.QIcon(pmMonkey())
+
def pmMoose():
return PM(580346,586970)
+
def Moose():
return QtGui.QIcon(pmMoose())
+
def pmMouse():
return PM(383520,389224)
+
def Mouse():
return QtGui.QIcon(pmMouse())
+
def pmOwl():
return PM(586970,593676)
+
def Owl():
return QtGui.QIcon(pmOwl())
+
def pmPanda():
return PM(593676,597710)
+
def Panda():
return QtGui.QIcon(pmPanda())
+
def pmPenguin():
return PM(597710,603259)
+
def Penguin():
return QtGui.QIcon(pmPenguin())
+
def pmPig():
return PM(603259,611299)
+
def Pig():
return QtGui.QIcon(pmPig())
+
def pmRabbit():
return PM(611299,618600)
+
def Rabbit():
return QtGui.QIcon(pmRabbit())
+
def pmRhino():
return PM(618600,624987)
+
def Rhino():
return QtGui.QIcon(pmRhino())
+
def pmRooster():
return PM(624987,630250)
+
def Rooster():
return QtGui.QIcon(pmRooster())
+
def pmShark():
return PM(630250,636020)
+
def Shark():
return QtGui.QIcon(pmShark())
+
def pmSheep():
return PM(636020,639851)
+
def Sheep():
return QtGui.QIcon(pmSheep())
+
def pmSnake():
return PM(639851,645876)
+
def Snake():
return QtGui.QIcon(pmSnake())
+
def pmTiger():
return PM(645876,653913)
+
def Tiger():
return QtGui.QIcon(pmTiger())
+
def pmTurkey():
return PM(653913,661327)
+
def Turkey():
return QtGui.QIcon(pmTurkey())
+
def pmTurtle():
return PM(661327,668048)
+
def Turtle():
return QtGui.QIcon(pmTurtle())
+
def pmWolf():
return PM(668048,671143)
+
def Wolf():
return QtGui.QIcon(pmWolf())
+
def pmSteven():
return PM(671143,678295)
+
def Steven():
return QtGui.QIcon(pmSteven())
+
def pmWheel():
return PM(678295,686360)
+
def Wheel():
return QtGui.QIcon(pmWheel())
+
def pmWheelchair():
return PM(686360,695164)
+
def Wheelchair():
return QtGui.QIcon(pmWheelchair())
+
def pmTouringMotorcycle():
return PM(695164,701476)
+
def TouringMotorcycle():
return QtGui.QIcon(pmTouringMotorcycle())
+
def pmContainer():
return PM(701476,706811)
+
def Container():
return QtGui.QIcon(pmContainer())
+
def pmBoatEquipment():
return PM(706811,712334)
+
def BoatEquipment():
return QtGui.QIcon(pmBoatEquipment())
+
def pmCar():
return PM(712334,716980)
+
def Car():
return QtGui.QIcon(pmCar())
+
def pmLorry():
return PM(716980,723016)
+
def Lorry():
return QtGui.QIcon(pmLorry())
+
def pmCarTrailer():
return PM(723016,727113)
+
def CarTrailer():
return QtGui.QIcon(pmCarTrailer())
+
def pmTowTruck():
return PM(727113,731871)
+
def TowTruck():
return QtGui.QIcon(pmTowTruck())
+
def pmQuadBike():
return PM(731871,737840)
+
def QuadBike():
return QtGui.QIcon(pmQuadBike())
+
def pmRecoveryTruck():
return PM(737840,742837)
+
def RecoveryTruck():
return QtGui.QIcon(pmRecoveryTruck())
+
def pmContainerLoader():
return PM(742837,747979)
+
def ContainerLoader():
return QtGui.QIcon(pmContainerLoader())
+
def pmPoliceCar():
return PM(747979,752811)
+
def PoliceCar():
return QtGui.QIcon(pmPoliceCar())
+
def pmExecutiveCar():
return PM(752811,757489)
+
def ExecutiveCar():
return QtGui.QIcon(pmExecutiveCar())
+
def pmTruck():
return PM(757489,762952)
+
def Truck():
return QtGui.QIcon(pmTruck())
+
def pmExcavator():
return PM(762952,767843)
+
def Excavator():
return QtGui.QIcon(pmExcavator())
+
def pmCabriolet():
return PM(767843,772681)
+
def Cabriolet():
return QtGui.QIcon(pmCabriolet())
+
def pmMixerTruck():
return PM(772681,778991)
+
def MixerTruck():
return QtGui.QIcon(pmMixerTruck())
+
def pmForkliftTruckLoaded():
return PM(778991,785139)
+
def ForkliftTruckLoaded():
return QtGui.QIcon(pmForkliftTruckLoaded())
+
def pmAmbulance():
return PM(785139,791189)
+
def Ambulance():
return QtGui.QIcon(pmAmbulance())
+
def pmDieselLocomotiveBoxcar():
return PM(791189,795195)
+
def DieselLocomotiveBoxcar():
return QtGui.QIcon(pmDieselLocomotiveBoxcar())
+
def pmTractorUnit():
return PM(795195,800662)
+
def TractorUnit():
return QtGui.QIcon(pmTractorUnit())
+
def pmFireTruck():
return PM(800662,807001)
+
def FireTruck():
return QtGui.QIcon(pmFireTruck())
+
def pmCargoShip():
return PM(807001,811342)
+
def CargoShip():
return QtGui.QIcon(pmCargoShip())
+
def pmSubwayTrain():
return PM(811342,816232)
+
def SubwayTrain():
return QtGui.QIcon(pmSubwayTrain())
+
def pmTruckMountedCrane():
return PM(816232,821973)
+
def TruckMountedCrane():
return QtGui.QIcon(pmTruckMountedCrane())
+
def pmAirAmbulance():
return PM(821973,827086)
+
def AirAmbulance():
return QtGui.QIcon(pmAirAmbulance())
+
def pmAirplane():
return PM(827086,831974)
+
def Airplane():
return QtGui.QIcon(pmAirplane())
+
def pmCaracol():
return PM(831974,833790)
+
def Caracol():
return QtGui.QIcon(pmCaracol())
+
def pmDownloads():
return PM(833790,835632)
+
def Downloads():
return QtGui.QIcon(pmDownloads())
+
def pmUno():
return PM(835632,838094)
+
def Uno():
return QtGui.QIcon(pmUno())
+
def pmMotoresExternos():
return PM(838094,839996)
+
def MotoresExternos():
return QtGui.QIcon(pmMotoresExternos())
+
def pmDatabase():
return PM(839996,840539)
+
def Database():
return QtGui.QIcon(pmDatabase())
+
def pmDatabaseC():
return PM(840539,840964)
+
def DatabaseC():
return QtGui.QIcon(pmDatabaseC())
+
def pmDatabaseF():
return PM(840964,841428)
+
def DatabaseF():
return QtGui.QIcon(pmDatabaseF())
+
def pmDatabaseCNew():
return PM(841428,842283)
+
def DatabaseCNew():
return QtGui.QIcon(pmDatabaseCNew())
+
def pmDatabaseMas():
return PM(842283,843906)
+
def DatabaseMas():
return QtGui.QIcon(pmDatabaseMas())
+
def pmAtacante():
return PM(843906,844511)
+
def Atacante():
return QtGui.QIcon(pmAtacante())
+
def pmAtacada():
return PM(844511,845077)
+
def Atacada():
return QtGui.QIcon(pmAtacada())
+
def pmGoToNext():
return PM(845077,845489)
+
def GoToNext():
return QtGui.QIcon(pmGoToNext())
+
def pmBlancas():
return PM(845489,845840)
+
def Blancas():
return QtGui.QIcon(pmBlancas())
+
def pmNegras():
return PM(845840,846086)
+
def Negras():
return QtGui.QIcon(pmNegras())
+
def pmFolderChange():
return PM(73457,76215)
+
def FolderChange():
return QtGui.QIcon(pmFolderChange())
+
def pmMarkers():
return PM(846086,847781)
+
def Markers():
return QtGui.QIcon(pmMarkers())
+
def pmTop():
return PM(847781,848365)
+
def Top():
return QtGui.QIcon(pmTop())
+
def pmBottom():
return PM(848365,848954)
+
def Bottom():
return QtGui.QIcon(pmBottom())
+
def pmSTS():
return PM(848954,851145)
+
def STS():
return QtGui.QIcon(pmSTS())
+
def pmRun():
return PM(851145,852869)
+
def Run():
return QtGui.QIcon(pmRun())
+
def pmWorldMap():
return PM(852869,855610)
+
def WorldMap():
return QtGui.QIcon(pmWorldMap())
+
def pmAfrica():
return PM(855610,858096)
+
def Africa():
return QtGui.QIcon(pmAfrica())
+
def pmMaps():
return PM(858096,859040)
+
def Maps():
return QtGui.QIcon(pmMaps())
+
def pmSol():
return PM(859040,859966)
+
def Sol():
return QtGui.QIcon(pmSol())
+
def pmSolNubes():
return PM(859966,860829)
+
def SolNubes():
return QtGui.QIcon(pmSolNubes())
+
def pmSolNubesLluvia():
return PM(860829,861789)
+
def SolNubesLluvia():
return QtGui.QIcon(pmSolNubesLluvia())
+
def pmLluvia():
return PM(861789,862628)
+
def Lluvia():
return QtGui.QIcon(pmLluvia())
+
def pmInvierno():
return PM(862628,864204)
+
def Invierno():
return QtGui.QIcon(pmInvierno())
+
def pmWords():
return PM(864204,867989)
+
def Words():
return QtGui.QIcon(pmWords())
+
def pmAdaptVoice():
return PM(368587,371561)
+
def AdaptVoice():
return QtGui.QIcon(pmAdaptVoice())
+
def pmFixedElo():
return PM(173836,175099)
+
def FixedElo():
return QtGui.QIcon(pmFixedElo())
+
def pmX_Microfono():
return PM(867989,870442)
+
def X_Microfono():
return QtGui.QIcon(pmX_Microfono())
+
def pmSoundTool():
return PM(870442,872901)
+
def SoundTool():
return QtGui.QIcon(pmSoundTool())
+
def pmImportar():
return PM(872901,875569)
+
def Importar():
return QtGui.QIcon(pmImportar())
+
def pmVoyager1():
return PM(875569,878019)
+
def Voyager1():
return QtGui.QIcon(pmVoyager1())
+
def pmTrain():
return PM(878019,879389)
+
def Train():
return QtGui.QIcon(pmTrain())
+
def pmPlay():
return PM(249421,251510)
+
def Play():
return QtGui.QIcon(pmPlay())
+
def pmMeasure():
return PM(132405,134028)
+
def Measure():
return QtGui.QIcon(pmMeasure())
+
def pmPlayGame():
return PM(879389,883747)
+
def PlayGame():
return QtGui.QIcon(pmPlayGame())
+
def pmScanner():
return PM(883747,884088)
+
def Scanner():
return QtGui.QIcon(pmScanner())
+
def pmMenos():
return PM(884088,884613)
+
def Menos():
return QtGui.QIcon(pmMenos())
+
def pmSchool():
return PM(884613,885154)
+
def School():
return QtGui.QIcon(pmSchool())
+
def pmLaw():
return PM(885154,885770)
+
def Law():
return QtGui.QIcon(pmLaw())
+
def pmLearnGame():
return PM(885770,886203)
+
def LearnGame():
return QtGui.QIcon(pmLearnGame())
+
def pmUniversity():
return PM(886203,886623)
+
def University():
return QtGui.QIcon(pmUniversity())
+
def pmLonghaul():
return PM(886623,887549)
+
def Longhaul():
return QtGui.QIcon(pmLonghaul())
+
def pmTrekking():
return PM(887549,888243)
+
def Trekking():
return QtGui.QIcon(pmTrekking())
+
def pmPassword():
return PM(888243,888696)
+
def Password():
return QtGui.QIcon(pmPassword())
+
def pmSQL_RAW():
return PM(879389,883747)
+
def SQL_RAW():
return QtGui.QIcon(pmSQL_RAW())
+
def pmSun():
return PM(338631,339509)
+
def Sun():
return QtGui.QIcon(pmSun())
+
def pmLight():
return PM(342509,343565)
+
def Light():
return QtGui.QIcon(pmLight())
+
def pmLight32():
return PM(888696,890396)
+
def Light32():
return QtGui.QIcon(pmLight32())
+
def pmTOL():
return PM(890396,891105)
+
def TOL():
return QtGui.QIcon(pmTOL())
+
def pmUned():
return PM(886203,886623)
+
def Uned():
return QtGui.QIcon(pmUned())
+
def pmUwe():
return PM(891105,892074)
+
def Uwe():
return QtGui.QIcon(pmUwe())
+
def pmThinking():
return PM(892074,892446)
+
def Thinking():
return QtGui.QIcon(pmThinking())
+
def pmWashingMachine():
return PM(892446,893109)
+
def WashingMachine():
return QtGui.QIcon(pmWashingMachine())
+
def pmTerminal():
return PM(893109,896653)
+
def Terminal():
return QtGui.QIcon(pmTerminal())
+
def pmManualSave():
return PM(896653,897236)
+
def ManualSave():
return QtGui.QIcon(pmManualSave())
+
def pmSettings():
return PM(897236,897674)
+
def Settings():
return QtGui.QIcon(pmSettings())
+
def pmStrength():
return PM(897674,898345)
+
def Strength():
return QtGui.QIcon(pmStrength())
+
def pmSingular():
return PM(898345,899200)
+
def Singular():
return QtGui.QIcon(pmSingular())
+
def pmScript():
return PM(899200,899769)
+
def Script():
return QtGui.QIcon(pmScript())
+
def pmScriptFree():
return PM(899769,900329)
+
def ScriptFree():
return QtGui.QIcon(pmScriptFree())
+
def pmTexto():
return PM(900329,903174)
+
def Texto():
return QtGui.QIcon(pmTexto())
+
def pmLampara():
return PM(903174,903883)
+
def Lampara():
return QtGui.QIcon(pmLampara())
+
def pmFile():
return PM(903883,906183)
+
def File():
return QtGui.QIcon(pmFile())
+
def pmCalculo():
return PM(906183,907109)
+
def Calculo():
return QtGui.QIcon(pmCalculo())
+
def pmOpeningLines():
return PM(907109,907787)
+
def OpeningLines():
return QtGui.QIcon(pmOpeningLines())
+
def pmStudy():
return PM(907787,908700)
+
def Study():
return QtGui.QIcon(pmStudy())
+
def pmLichess():
return PM(908700,909590)
+
def Lichess():
return QtGui.QIcon(pmLichess())
+
def pmMiniatura():
return PM(909590,910517)
+
def Miniatura():
return QtGui.QIcon(pmMiniatura())
+
def pmLocomotora():
return PM(910517,911298)
+
def Locomotora():
return QtGui.QIcon(pmLocomotora())
+
def pmPositions():
return PM(911298,912889)
+
def Positions():
return QtGui.QIcon(pmPositions())
+
def pmTrainSequential():
return PM(912889,914030)
+
def TrainSequential():
return QtGui.QIcon(pmTrainSequential())
+
def pmTrainStatic():
return PM(914030,914990)
+
def TrainStatic():
return QtGui.QIcon(pmTrainStatic())
+
def pmTrainPositions():
return PM(914990,915971)
+
def TrainPositions():
return QtGui.QIcon(pmTrainPositions())
+
def pmTrainEngines():
return PM(915971,917405)
+
def TrainEngines():
return QtGui.QIcon(pmTrainEngines())
+
def pmError():
return PM(50641,54641)
+
def Error():
return QtGui.QIcon(pmError())
+
def pmAtajos():
return PM(917405,918584)
+
def Atajos():
return QtGui.QIcon(pmAtajos())
+
def pmTOLline():
return PM(918584,919688)
+
def TOLline():
return QtGui.QIcon(pmTOLline())
+
def pmTOLchange():
return PM(919688,921910)
+
def TOLchange():
return QtGui.QIcon(pmTOLchange())
+
def pmPack():
return PM(921910,922575)
+
def Pack():
return QtGui.QIcon(pmPack())
+
def pmHome():
return PM(193506,194688)
+
def Home():
return QtGui.QIcon(pmHome())
+
def pmImport8():
return PM(922575,923785)
+
def Import8():
return QtGui.QIcon(pmImport8())
+
def pmExport8():
return PM(923785,924410)
+
def Export8():
return QtGui.QIcon(pmExport8())
+
def pmTablas8():
return PM(924410,925202)
+
def Tablas8():
return QtGui.QIcon(pmTablas8())
+
def pmBlancas8():
return PM(925202,926232)
+
def Blancas8():
return QtGui.QIcon(pmBlancas8())
+
def pmNegras8():
return PM(926232,927071)
+
def Negras8():
return QtGui.QIcon(pmNegras8())
+
def pmBook():
return PM(927071,927645)
+
def Book():
return QtGui.QIcon(pmBook())
+
+def pmWrite():
+ return PM(927645,928551)
+
+
+def Write():
+ return QtGui.QIcon(pmWrite())
+
diff --git a/Code/QT/InfoBase.py b/Code/QT/InfoBase.py
index 6bcc77f..863e967 100644
--- a/Code/QT/InfoBase.py
+++ b/Code/QT/InfoBase.py
@@ -62,7 +62,7 @@ def listaMotores(self, bloque):
["Critter 1.6a 32bits", "Richard Vida", "http://www.vlasak.biz/critter/"],
["Texel 1.07", "Peter Österlund", "http://hem.bredband.net/petero2b/javachess/index.html#texel"],
["Stockfish 9", "Tord Romstad, Marco Costalba, Joona Kiiski", "http://stockfishchess.org/"],
- ["McBrain 9.1", "Michael Byrne", "https://github.com/MichaelB7/Stockfish/releases"],
+ ["McBrain 9.9", "Michael Byrne", "https://github.com/MichaelB7/Stockfish/releases"],
["Gull 3", "Vadim Demichev", "https://sourceforge.net/projects/gullchess/"],
["Delfi 5.4", "Fabio Cavicchio", "http://www.msbsoftware.it/delfi/"],
# ["SmartThink 1.97", "Sergei S. Markoff", "http://genes1s.net/smarthink.php"],
@@ -244,7 +244,7 @@ def Images(self):
("Figurines", 'Armando H. Marroquín', 'http://www.enpassant.dk/chess/fonteng.htm', _("Freeware")),
("Icons for Windows8", 'Icons8', 'https://icons8.com', "Creative Commons Attribution-NoDerivs 3.0 Unported"),
("Transsiberian map", "Stefan Ertmann & Lokal Profil",
- "https://commons.wikimedia.org/wiki/File%3ATrans-Siberian_railway_map.svg", "CC BY-SA 2.5 via Wikimedia Commons"),
+ "https://commons.wikimedia.org/wiki/File:Trans-Siberian_railway_map.svg", "CC BY-SA 2.5 via Wikimedia Commons"),
("Washing machine", "Shinnoske", "https://openclipart.org/detail/218905/simple-washing-machine", "Public domain"),
]
for tipo, autor, web, licencia in li:
diff --git a/Code/QT/POLAnalisis.py b/Code/QT/POLAnalisis.py
index 7b89acd..133618b 100644
--- a/Code/QT/POLAnalisis.py
+++ b/Code/QT/POLAnalisis.py
@@ -1,6 +1,6 @@
import os
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from PyQt4 import QtGui, QtCore
diff --git a/Code/QT/PantallaAnotar.py b/Code/QT/PantallaAnotar.py
new file mode 100644
index 0000000..a9c0a13
--- /dev/null
+++ b/Code/QT/PantallaAnotar.py
@@ -0,0 +1,118 @@
+from Code import Util
+from Code.QT import Colocacion
+from Code.QT import Columnas
+from Code.QT import Controles
+from Code.QT import Grid
+from Code.QT import Iconos
+from Code.QT import QTUtil2
+from Code.QT import QTVarios
+
+
+class WAnotar(QTVarios.WDialogo):
+ def __init__(self, procesador):
+
+ self.procesador = procesador
+ self.configuracion = procesador.configuracion
+ self.resultado = None
+ self.db = Util.DicSQL(self.configuracion.ficheroAnotar)
+ self.lista = self.db.keys(True, True)
+ self.resultado = None
+
+ QTVarios.WDialogo.__init__(self, procesador.pantalla, _("Writing down moves of a game"), Iconos.Write(), "annotateagame")
+
+ oColumnas = Columnas.ListaColumnas()
+ oColumnas.nueva("DATE", _("Date"), 110)
+ oColumnas.nueva("COLOR", _("Color"), 80, siCentrado=True)
+ oColumnas.nueva("GAME", _("Game"), 280)
+ oColumnas.nueva("MOVES", _("Moves"), 80, siCentrado=True)
+ oColumnas.nueva("TIME", _("Avg time"), 80, siCentrado=True)
+ oColumnas.nueva("ERRORS", _("Errors"), 80, siCentrado=True)
+ oColumnas.nueva("HINTS", _("Hints"), 80, siCentrado=True)
+ self.glista = Grid.Grid(self, oColumnas, siSelecFilas=True, siSeleccionMultiple=True)
+
+ liAcciones = (
+ (_("Close"), Iconos.MainMenu(), self.terminar), None,
+ (_("New"), Iconos.Nuevo(), self.new), None,
+ (_("Repeat"), Iconos.Copiar(), self.repetir), None,
+ (_("Remove"), Iconos.Borrar(), self.borrar), None,
+ )
+ tb = Controles.TBrutina(self, liAcciones)
+
+ ly = Colocacion.V().control(tb).control(self.glista).margen(4)
+
+ self.setLayout(ly)
+
+ self.registrarGrid(self.glista)
+ self.recuperarVideo(anchoDefecto=self.glista.anchoColumnas()+20)
+
+ def gridDobleClick(self, grid, fila, oColumna):
+ self.repetir()
+
+ def repetir(self):
+ recno = self.glista.recno()
+ if recno >= 0:
+ registro = self.db[self.lista[recno]]
+ self.haz(registro["PC"])
+
+ def new(self):
+ self.haz(None)
+
+ def haz(self, que):
+ siblancasabajo = QTVarios.blancasNegras(self)
+ if siblancasabajo is None:
+ return
+ self.resultado = que, siblancasabajo
+ self.guardarVideo()
+ self.db.close()
+ self.accept()
+
+ def borrar(self):
+ li = self.glista.recnosSeleccionados()
+ if len(li) > 0:
+ mens = _("Do you want to delete all selected records?")
+ if QTUtil2.pregunta(self, mens):
+ for fila in li:
+ del self.db[self.lista[fila]]
+ recno = self.glista.recno()
+ self.glista.refresh()
+ self.lista = self.db.keys(True, True)
+ if recno >= len(self.lista):
+ self.glista.gobottom()
+
+ def gridNumDatos(self, grid):
+ return len(self.lista)
+
+ def gridDato(self, grid, fila, oColumna):
+ col = oColumna.clave
+ reg = self.db[self.lista[fila]]
+ if not reg:
+ return ""
+ if col == "DATE":
+ return self.lista[fila]
+ elif col == "GAME":
+ return reg["PC"].titulo(("DATE", "EVENT", "WHITE", "BLACK", "RESULT"))
+ elif col == "MOVES":
+ total = len(reg["PC"])
+ moves = reg["MOVES"]
+ if total == moves:
+ return str(total)
+ else:
+ return "%d/%d" % (moves, total)
+ elif col == "TIME":
+ return "%0.2f\"" % reg["TIME"]
+ elif col == "HINTS":
+ return str(reg["HINTS"])
+ elif col == "ERRORS":
+ return str(reg["ERRORS"])
+ elif col == "COLOR":
+ return _("White") if reg["COLOR"] else _("Black")
+
+ def closeEvent(self, event): # Cierre con X
+ self.db.close()
+ self.guardarVideo()
+
+ def terminar(self):
+ self.db.close()
+ self.guardarVideo()
+ self.reject()
+
diff --git a/Code/QT/PantallaArbol.py b/Code/QT/PantallaArbol.py
index 106afea..1f1a641 100644
--- a/Code/QT/PantallaArbol.py
+++ b/Code/QT/PantallaArbol.py
@@ -1,6 +1,6 @@
import collections
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from PyQt4 import QtGui, QtCore
diff --git a/Code/QT/PantallaEverest.py b/Code/QT/PantallaEverest.py
index 75f14aa..f41015d 100644
--- a/Code/QT/PantallaEverest.py
+++ b/Code/QT/PantallaEverest.py
@@ -1,7 +1,7 @@
import os.path
import random
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from PyQt4 import QtSvg, QtCore
from Code import Everest
diff --git a/Code/QT/PantallaHorses.py b/Code/QT/PantallaHorses.py
index 24d64db..4cb4d2e 100644
--- a/Code/QT/PantallaHorses.py
+++ b/Code/QT/PantallaHorses.py
@@ -3,7 +3,7 @@
import random
import time
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import ControlPosicion
from Code.QT import Colocacion
diff --git a/Code/QT/PantallaLearnPGN.py b/Code/QT/PantallaLearnPGN.py
index db3b823..287d138 100644
--- a/Code/QT/PantallaLearnPGN.py
+++ b/Code/QT/PantallaLearnPGN.py
@@ -504,6 +504,7 @@ def mueveHumano(self, desde, hasta, coronacion=""):
else:
if hasta != desde:
self.errors += 1
+ self.tableroIni.ponFlechasTmp([(jg.desde, jg.hasta, False)])
self.ponInfo()
return False
diff --git a/Code/QT/PantallaOpeningLine.py b/Code/QT/PantallaOpeningLine.py
index 69c3372..61b756f 100644
--- a/Code/QT/PantallaOpeningLine.py
+++ b/Code/QT/PantallaOpeningLine.py
@@ -258,7 +258,7 @@ def train(self):
if trEng or trSSP:
submenu.opcion("update", _("Update current trainings"), Iconos.Reindexar())
submenu.separador()
- submenu1 = submenu.submenu(_("Re-create all trainings"), Iconos.Modificar())
+ submenu1 = submenu.submenu(_("Create trainings"), Iconos.Modificar())
submenu1.opcion("new_ssp", "%s - %s - %s" %(_("Sequential"), _("Static"), _("Positions")), Iconos.TrainSequential())
submenu1.opcion("new_eng", "With engines", Iconos.TrainEngines())
@@ -331,6 +331,11 @@ def trainNewEngines(self):
engine_time = 5.0
num_engines = 20
key_engine = "alaric"
+ ext_engines = []
+ auto_analysis = True
+ ask_movesdifferent = False
+ times = [500, 1000, 2000, 4000, 8000]
+ books = ["", "", "", "", ""]
if training is not None:
color = training["COLOR"]
@@ -341,6 +346,11 @@ def trainNewEngines(self):
engine_time = training.get("ENGINE_TIME", engine_time)
num_engines = training.get("NUM_ENGINES", num_engines)
key_engine = training.get("KEY_ENGINE", key_engine)
+ ext_engines = training.get("EXT_ENGINES", ext_engines)
+ auto_analysis = training.get("AUTO_ANALYSIS", auto_analysis)
+ ask_movesdifferent = training.get("ASK_MOVESDIFFERENT", ask_movesdifferent)
+ times = training.get("TIMES", times)
+ books = training.get("BOOKS", books)
separador = FormLayout.separador
liGen = [separador]
@@ -353,12 +363,12 @@ def trainNewEngines(self):
liGen.append(separador)
liGen.append((_("Moves until the control") + ":", control))
liGen.append(separador)
- liGen.append((_("Maximum number of centipawns lost to pass control") + ":", lost_points))
+ liGen.append((_("Maximum number of lost centipawns to pass control") + ":", lost_points))
liGen.append(separador)
dicRivales = self.configuracion.dicRivales
dicRivales = EnginesBunch.filtra(dicRivales)
- config = FormLayout.Spinbox(_("Number of engines"), 2, len(dicRivales), 50)
+ config = FormLayout.Spinbox(_("Number of engines"), 0, len(dicRivales), 50)
liGen.append((config, num_engines))
likeys = [(dicRivales[x].nombre, x) for x in dicRivales]
@@ -371,16 +381,84 @@ def trainNewEngines(self):
liGen.append((config, engine_control))
liGen.append((_("Duration of analysis (secs)") + ":", float(engine_time)))
- resultado = FormLayout.fedit(liGen, title=_("With engines"), parent=self, anchoMinimo=360, icon=Iconos.Study())
+ liGen.append(separador)
+
+ liGen.append((_("Automatic analysis") + ":", auto_analysis))
+
+ liGen.append(separador)
+
+ liGen.append((_("Ask when the moves are different from the line") + ":", ask_movesdifferent))
+
+ liMotoresExternos = self.configuracion.listaMotoresExternos(ordenados=False)
+ if liMotoresExternos:
+ liExt = [separador]
+ for cm in liMotoresExternos:
+ liExt.append((cm.nombre, cm.alias in ext_engines))
+ else:
+ liExt = None
+
+ liLevels = [separador]
+ listaLibros = Books.ListaLibros()
+ listaLibros.recuperaVar(self.configuracion.ficheroBooks)
+ listaLibros.comprueba()
+ libooks = [(bookx.nombre, bookx) for bookx in listaLibros.lista]
+ libooks.insert(0, ("--", None))
+ for level in range(5):
+ n = level+1
+ title = "%s %d" % (_("Level"), n)
+ liLevels.append((None, title))
+ tm = times[level]/1000.0 if len(times) > level else 0.0
+ liLevels.append((_("Time engines think in seconds") + ":", tm))
+
+ bk = books[level] if len(books) > level else ""
+ book = listaLibros.buscaLibro(bk) if bk else None
+ config = FormLayout.Combobox(_("Book"), libooks)
+ liLevels.append((config, book))
+
+ lista = []
+ lista.append((liGen, _("Basic data"), ""))
+ if liExt:
+ lista.append((liExt, _("External engines"), ""))
+ lista.append((liLevels, _("Levels"), ""))
+
+ resultado = FormLayout.fedit(lista, title=_("With engines"), parent=self, anchoMinimo=360, icon=Iconos.Study())
if resultado is None:
return
accion, liResp = resultado
+ selMotoresExt = []
+ if liMotoresExternos:
+ liGen, liExt, liLevels = liResp
+
+ for x in range(len(liMotoresExternos)):
+ if liExt[x]:
+ selMotoresExt.append(liMotoresExternos[x].alias)
+ else:
+ liGen, liLevels = liResp
+
reg = {}
(reg["COLOR"], reg["MANDATORY"], reg["CONTROL"], reg["LOST_POINTS"], reg["NUM_ENGINES"], reg["KEY_ENGINE"],
- reg["ENGINE_CONTROL"], reg["ENGINE_TIME"] ) = liResp
+ reg["ENGINE_CONTROL"], reg["ENGINE_TIME"], reg["AUTO_ANALYSIS"], reg["ASK_MOVESDIFFERENT"] ) = liGen
+ reg["EXT_ENGINES"] = selMotoresExt
+
+ if (len(selMotoresExt) + reg["NUM_ENGINES"]) == 0:
+ reg["NUM_ENGINES"] = 1
+
+ times = []
+ books = []
+ for x in range(5):
+ tm = int(liLevels[x*2]*1000)
+ bk = liLevels[x*2+1]
+ if tm:
+ times.append(tm)
+ books.append(bk.nombre if bk else "")
+ if len(times) == 0:
+ times.append(500)
+ books.append(None)
+ reg["TIMES"] = times
+ reg["BOOKS"] = books
self.dbop.createTrainingEngines(reg, self.procesador)
diff --git a/Code/QT/PantallaTorneos.py b/Code/QT/PantallaTorneos.py
index 217ce91..2b4e1ab 100644
--- a/Code/QT/PantallaTorneos.py
+++ b/Code/QT/PantallaTorneos.py
@@ -760,6 +760,8 @@ def gmGuardar(self):
if w.exec_():
ws = PantallaSavePGN.FileSavePGN(self, w.dic_result)
if ws.open():
+ if not ws.is_new:
+ ws.write("\n\n")
ws.write(pgn)
ws.close()
ws.um_final()
diff --git a/Code/QT/PantallaVisualiza.py b/Code/QT/PantallaVisualiza.py
index 07b8d2c..a40e645 100644
--- a/Code/QT/PantallaVisualiza.py
+++ b/Code/QT/PantallaVisualiza.py
@@ -1,7 +1,7 @@
import os.path
import time
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from PyQt4 import QtCore
from Code import ControlPosicion
diff --git a/Code/QT/QTUtil2.py b/Code/QT/QTUtil2.py
index 6ce54ce..8fe3346 100644
--- a/Code/QT/QTUtil2.py
+++ b/Code/QT/QTUtil2.py
@@ -247,11 +247,14 @@ def test():
mensEspera = ControlMensEspera()
-def mensajeTemporal(pantalla, mensaje, segundos, background=None, pmImagen=None, posicion="c", fixedSize=256, siCancelar=None):
+def mensajeTemporal(pantalla, mensaje, segundos, background=None, pmImagen=None, posicion="c", fixedSize=256,
+ siCancelar=None, titCancelar=None):
if siCancelar is None:
siCancelar = segundos > 3.0
+ if titCancelar is None:
+ titCancelar = _("Continue")
me = mensEspera.inicio(pantalla, mensaje, background=background, pmImagen=pmImagen, siCancelar=siCancelar,
- titCancelar=_("Continue"), posicion=posicion, fixedSize=fixedSize)
+ titCancelar=titCancelar, posicion=posicion, fixedSize=fixedSize)
if segundos:
me.time(segundos)
return me
@@ -416,6 +419,8 @@ def __init__(self, owner, titulo, mensaje, total):
self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.WindowTitleHint | QtCore.Qt.WindowMinimizeButtonHint)
self.setWindowTitle(titulo)
self.owner = owner
+ self.setAutoClose(False)
+ self.setAutoReset(False)
def mostrar(self):
if self.owner:
diff --git a/Code/QT/QTVarios.py b/Code/QT/QTVarios.py
index abc1761..3ae8810 100644
--- a/Code/QT/QTVarios.py
+++ b/Code/QT/QTVarios.py
@@ -1126,3 +1126,43 @@ def menuDB(submenu, configuracion, siFEN, siAll=False):
for fich in lista:
submenu.opcion("dbf_%s" % os.path.join(carpeta, fich), _F(fich[:-4]), rp.otro())
submenu.separador()
+
+
+class ReadAnnotation(QtGui.QDialog):
+ def __init__(self, parent, objetivo):
+ QtGui.QDialog.__init__(self, parent)
+ self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.FramelessWindowHint)
+
+ self.edAnotacion = Controles.ED(self, "")
+ btAceptar = Controles.PB(self, "", rutina=self.aceptar).ponIcono(Iconos.Aceptar())
+ btCancelar = Controles.PB(self, "", rutina=self.cancelar).ponIcono(Iconos.Cancelar())
+ btAyuda = Controles.PB(self, "", rutina=self.ayuda).ponIcono(Iconos.AyudaGR())
+
+ self.objetivo = objetivo
+ self.conAyuda = False
+ self.errores = 0
+ self.resultado = None
+
+ layout = Colocacion.H().relleno(1).control(btAyuda).control(self.edAnotacion).control(btAceptar).control(btCancelar).margen(3)
+ self.setLayout(layout)
+ self.move(parent.x()+parent.tablero.width()-212, parent.y()+parent.tablero.y()-3)
+
+ def aceptar(self):
+ txt = self.edAnotacion.texto()
+ txt = txt.strip().replace(" ", "").upper()
+
+ if txt:
+ if txt == self.objetivo.upper():
+ self.resultado = self.conAyuda, self.errores
+ self.accept()
+ else:
+ self.errores += 1
+ self.edAnotacion.setStyleSheet("QWidget { color: red }")
+
+ def cancelar(self):
+ self.reject()
+
+ def ayuda(self):
+ self.conAyuda = True
+ self.edAnotacion.ponTexto(self.objetivo)
+
diff --git a/Code/QT/Tablero.py b/Code/QT/Tablero.py
index 8cc7bb0..2872e36 100644
--- a/Code/QT/Tablero.py
+++ b/Code/QT/Tablero.py
@@ -1607,6 +1607,12 @@ def ponerPiezasAbajo(self, siBlancasAbajo):
self.escena.update()
+ def showCoordenadas(self, ok):
+ for coord in self.liCoordenadasHorizontales:
+ coord.setVisible(ok)
+ for coord in self.liCoordenadasVerticales:
+ coord.setVisible(ok)
+
def peonCoronando(self, siBlancas):
if self.configuracion.autocoronacion:
modifiers = QtGui.QApplication.keyboardModifiers()
diff --git a/Code/QT/WBG_Players.py b/Code/QT/WBG_Players.py
index d8797de..ca26b42 100644
--- a/Code/QT/WBG_Players.py
+++ b/Code/QT/WBG_Players.py
@@ -1,4 +1,4 @@
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from PyQt4 import QtGui, QtCore
diff --git a/Code/RunKibitzer.py b/Code/RunKibitzer.py
index 8155d1b..13c85d1 100644
--- a/Code/RunKibitzer.py
+++ b/Code/RunKibitzer.py
@@ -2,7 +2,7 @@
import sys
import time
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from PyQt4 import QtCore, QtGui
import struct
diff --git a/Code/Tacticas.py b/Code/Tacticas.py
index 233b10d..aeb0d75 100644
--- a/Code/Tacticas.py
+++ b/Code/Tacticas.py
@@ -261,6 +261,12 @@ def leeDatos(self, carpetaUser):
if reference is None:
db["REFERENCE"] = ""
+ penalization = db["PENALIZATION"]
+ if penalization is None:
+ penalization = db["PENALIZATION"] = [1,2,3,4]
+
+ self.PENALIZATION = penalization
+
def listaFicheros(self, clave):
dalias = self.tts.dic.get("ALIAS", {})
if clave in dalias:
@@ -393,6 +399,8 @@ def busca(desde, salto):
db["REFERENCE"] = self.REFERENCE
+ db["PENALIZATION"] = self.PENALIZATION
+
# 6.3d---------------+
liHisto = db["HISTO"]
if not liHisto:
diff --git a/Code/Torneo.py b/Code/Torneo.py
index 2f4f14a..44dfdfc 100644
--- a/Code/Torneo.py
+++ b/Code/Torneo.py
@@ -269,6 +269,10 @@ def pgn(self, torneo):
("Black", enb.alias),
("Result", rs),
]
+ if enw.elo:
+ li.append(("WhiteElo", "%d" % enw.elo))
+ if enb.elo:
+ li.append(("BlackElo", "%d" % enb.elo))
if not self._partida.siFenInicial():
li.append(("FEN", self._partida.iniPosicion.fen()))
diff --git a/Code/Tutor.py b/Code/Tutor.py
index 4fb426a..7c44c86 100644
--- a/Code/Tutor.py
+++ b/Code/Tutor.py
@@ -1,7 +1,7 @@
import codecs
import os
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import Analisis
from Code import Partida
diff --git a/Code/Util.py b/Code/Util.py
index aa219f3..50328b8 100644
--- a/Code/Util.py
+++ b/Code/Util.py
@@ -994,6 +994,13 @@ def pack(self):
cursor.close()
self._conexion.commit()
+ def deleteall(self):
+ cursor = self._conexion.cursor()
+ cursor.execute("DELETE FROM %s" % self.table)
+ cursor.execute("VACUUM")
+ cursor.close()
+ self._conexion.commit()
+
def __enter__(self):
return self
diff --git a/Code/XGestorMotor.py b/Code/XGestorMotor.py
index aaea40c..853a182 100644
--- a/Code/XGestorMotor.py
+++ b/Code/XGestorMotor.py
@@ -1,6 +1,6 @@
import os
-import LCEngineV1 as LCEngine
+import LCEngine2 as LCEngine
from Code import VarGen
from Code import XMotor
diff --git a/Engines/Linux32/mcbrain/.DS_Store b/Engines/Linux32/mcbrain/.DS_Store
index 01c2e2c..f2a08a1 100644
Binary files a/Engines/Linux32/mcbrain/.DS_Store and b/Engines/Linux32/mcbrain/.DS_Store differ
diff --git a/Engines/Linux32/mcbrain/.gitignore b/Engines/Linux32/mcbrain/.gitignore
new file mode 100644
index 0000000..b5f56bd
--- /dev/null
+++ b/Engines/Linux32/mcbrain/.gitignore
@@ -0,0 +1,24 @@
+################################################################################
+# This .gitignore file was automatically created by Microsoft(R) Visual Studio.
+################################################################################
+
+*.pdb
+*.tlog
+*.log
+*.exe
+*.obj
+*.lastbuildstate
+*.ilk
+*.idb
+*.ipch
+*.opendb
+*.db
+*.suo
+*.sqlite
+*.json
+
+# Ignore temporary folders
+.vs/
+/executable/Machine Learning/SugarMachineLearning.sml
+/executable/Master/Cerebellum_Light_Poly.bin
+/executable/Base Master/Cerebellum_Light_Poly.bin
diff --git a/Engines/Linux32/mcbrain/.travis.yml b/Engines/Linux32/mcbrain/.travis.yml
index 0a214d1..ded29e4 100644
--- a/Engines/Linux32/mcbrain/.travis.yml
+++ b/Engines/Linux32/mcbrain/.travis.yml
@@ -9,9 +9,9 @@ matrix:
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
- packages: ['g++-6', 'g++-6-multilib', 'g++-multilib', 'valgrind', 'expect']
+ packages: ['g++-7', 'g++-7-multilib', 'g++-multilib', 'valgrind', 'expect', 'curl']
env:
- - COMPILER=g++-6
+ - COMPILER=g++-7
- COMP=gcc
- os: linux
@@ -19,7 +19,7 @@ matrix:
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-5.0']
- packages: ['clang-5.0', 'llvm-5.0-dev', 'g++-multilib', 'valgrind', 'expect']
+ packages: ['clang-5.0', 'llvm-5.0-dev', 'g++-multilib', 'valgrind', 'expect', 'curl']
env:
- COMPILER=clang++-5.0
- COMP=clang
@@ -69,6 +69,6 @@ script:
#
# Sanitizer
#
- # Use g++-6 as a proxy for having sanitizers, might need revision as they become available for more recent versions of clang/gcc
- - if [[ "$COMPILER" == "g++-6" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=undefined optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-undefined; fi
- - if [[ "$COMPILER" == "g++-6" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=thread optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-thread; fi
+ # Use g++-7 as a proxy for having sanitizers, might need revision as they become available for more recent versions of clang/gcc
+ - if [[ "$COMPILER" == "g++-7" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=undefined optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-undefined; fi
+ - if [[ "$COMPILER" == "g++-7" ]]; then make clean && make -j2 ARCH=x86-64 sanitize=thread optimize=no debug=yes build > /dev/null && ../tests/instrumented.sh --sanitizer-thread; fi
diff --git a/Engines/Linux32/mcbrain/AUTHORS b/Engines/Linux32/mcbrain/AUTHORS
index 9b91b93..9c25509 100644
--- a/Engines/Linux32/mcbrain/AUTHORS
+++ b/Engines/Linux32/mcbrain/AUTHORS
@@ -1,98 +1,122 @@
-# Generated with 'git shortlog -sn | cut -c8-', which sorts by commits, manually ordered the first four authors, merged duplicates
+# List of authors for Stockfish, updated just after version 9
-Tord Romstad
+Tord Romstad (romstad)
Marco Costalba (mcostalba)
Joona Kiiski (zamar)
Gary Linscott (glinscott)
-Lucas Braesch (lucasart)
-Bill Henry (VoyagerOne)
-mstembera
-Stéphane Nicolet (Stephane Nicolet, snicolet)
-Stefan Geschwentner
-Alain SAVARD (Rocky640)
-Jörg Oster (Joerg Oster, joergoster)
-Reuven Peleg
-Chris Caino (Chris Cain, ceebo)
-Jean-Francois Romang
-homoSapiensSapiens
-Leonid Pechenik
-Stefano Cardanobile (Stefano80)
-Arjun Temurnikar
-Uri Blass (uriblass)
-jundery
-Ajith (ajithcj)
-hxim
-Ralph Stößer (Ralph Stoesser)
-Guenther Demetz
-Jonathan Calovski (Mysseno)
-Tom Vijlbrief
-mbootsector
-Daylen Yang
-ElbertoOne
-Henri Wiechers
-loco-loco
-Joost VandeVondele (Joost Vandevondele)
-Ronald de Man (syzygy)
-DU-jdto
-David Zar
-Eelco de Groot
-Jerry Donald
-NicklasPersson
-Ryan Schmitt
+
+absimaldata
+Ajith Chandy Jose (ajithcj)
+Alain Savard (Rocky640)
Alexander Kure
-Dan Schmidt
-H. Felix Wittmann
-Jacques
-Joseph R. Prostko
-Justin Blanchard
-Linus Arver
-Luca Brivio
-Lyudmil Antonov
-Rodrigo Exterckötter Tjäder
-Ron Britvich
-RyanTaker
-Vince Negri
-erbsenzaehler
-Joseph Hellis (jhellis3)
-shane31
-Andrew Grant
+Ali AlZhrani (Cooffe)
+Andrew Grant (AndyGrant)
+Andrey Neporada (nepal)
Andy Duplain
+Aram Tumanian (atumanian)
+Arjun Temurnikar
Auguste Pop
Balint Pfliegel
+Ben Koshy (BKSpurgeon)
+Bill Henry (VoyagerOne)
+braich
+Brian Sheppard (SapphireBrand)
+Bryan Cross (crossbr)
+Bujun Guo (noobpwnftw)
+Chris Cain (ceebo)
+Dan Schmidt
+Daniel Dugovic (ddugovic)
Dariusz Orzechowski
+David Zar
+Daylen Yang (daylen)
DiscanX
+Eelco de Groot
+ElbertoOne
+erbsenzaehler
Ernesto Gatti
+Fabian Beuke (madnight)
+Fabian Fichter (ianfab)
+fanon
+Fauzi Akram Dabat (FauziAkram)
+Felix Wittmann
+gamander
+gguliash
+Gian-Carlo Pascutto (gcp)
+Gontran Lemaire (gonlem)
+Goodkov Vasiliy Aleksandrovich (goodkov)
Gregor Cramer
+GuardianRM
+Günther Demetz (pb00067, pb00068)
+Guy Vreuls (gvreuls)
+Henri Wiechers
Hiraoka Takuya (HiraokaTakuya)
+homoSapiensSapiens
Hongzhi Cheng
-IIvec
+Ivan Ivec (IIvec)
+Jacques B. (Timshel)
+Jan Ondruš (hxim)
+Jarrod Torriero (DU-jdto)
+Jean-Francois Romang
+Jerry Donald Watson (jerrydonaldwatson)
+Jonathan Calovski (Mysseno)
+Joost VandeVondele (vondele)
+Jörg Oster (joergoster)
+Joseph Ellis (jhellis3)
+Joseph R. Prostko
+jundery
+Justin Blanchard
Kelly Wilson
-Ken T Takusagawa
+Ken Takusagawa
+kinderchocolate
+Kiran Panditrao (Krgp)
Kojirion
-Krgp
-Matt Sullivan
-Matthew Lai
+Leonardo LjubiÄić (GM)
+Leonid Pechenik (lp--)
+Linus Arver
+loco-loco
+Luca Brivio (lucabrivio)
+Lucas Braesch (lucasart)
+Lyudmil Antonov (lantonov)
+Matthew Lai (matthewlai)
Matthew Sullivan
-Michel Van den Bergh
-Niklas Fiekas
+Mark Tenzer (31m059)
+Michael Byrne (MichaelB7)
+Michael Stembera (mstembera)
+Michel Van den Bergh (vdbergh)
+Miguel Lahoz (miguel-l)
+Mikael Bäckman (mbootsector)
+Mike Whiteley (protonspring)
+Miroslav Fontán (Hexik)
+Moez Jellouli (MJZ1977)
+Mohammed Li (tthsqe12)
+Nathan Rugg (nmrugg)
+Nicklas Persson (NicklasPersson)
+Niklas Fiekas (niklasf)
Oskar Werkelin Ahlin
Pablo Vazquez
Pascal Romaret
+Pasquale Pigazzini (ppigazzini)
+Patrick Jansen (mibere)
+pellanda
+Ralph Stößer (Ralph Stoesser)
Raminder Singh
+renouve
+Reuven Peleg
Richard Lloyd
+Rodrigo Exterckötter Tjäder
+Ron Britvich
+Ronald de Man (syzygy1)
+Ryan Schmitt
Ryan Takker
-Thanar2
-absimaldata
-atumanian
-braich
-fanon
-gamander
-gguliash
-kinderchocolate
-pellanda
-ppigazzini
-renouve
+Sergei Antonov (saproj)
sf-x
+shane31
+Stefan Geschwentner (locutus2)
+Stefano Cardanobile (Stefano80)
+Stéphane Nicolet (snicolet)
+Thanar2
thaspel
-unknown
-
+Tom Vijlbrief (tomtor)
+Torsten Franz (torfranz)
+Uri Blass (uriblass)
+Vince Negri
diff --git a/Engines/Linux32/mcbrain/McBrain-91_x32_linux b/Engines/Linux32/mcbrain/McBrain-91_x32_linux
deleted file mode 100644
index 776a814..0000000
Binary files a/Engines/Linux32/mcbrain/McBrain-91_x32_linux and /dev/null differ
diff --git a/Engines/Linux32/mcbrain/McBrain-v99_x32_linux b/Engines/Linux32/mcbrain/McBrain-v99_x32_linux
new file mode 100644
index 0000000..de4e10a
Binary files /dev/null and b/Engines/Linux32/mcbrain/McBrain-v99_x32_linux differ
diff --git a/Engines/Linux32/mcbrain/Readme.md b/Engines/Linux32/mcbrain/Readme.md
index 46f2609..8913595 100644
--- a/Engines/Linux32/mcbrain/Readme.md
+++ b/Engines/Linux32/mcbrain/Readme.md
@@ -1,33 +1,30 @@
-### Overview
+### Overview [](https://travis-ci.org/official-stockfish/Stockfish)
-[](https://travis-ci.org/official-stockfish/Stockfish)
-[](https://ci.appveyor.com/project/mcostalba/stockfish)
-
-Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is
+SugaR is a free UCI chess engine derived from Stockfish. It is
not a complete chess program and requires some UCI-compatible GUI
(e.g. XBoard with PolyGlot, eboard, Arena, Sigma Chess, Shredder, Chess
-Partner or Fritz) in order to be used comfortably. Read the
+Partner, Aquarium or Fritz) in order to be used comfortably. Read the
documentation for your GUI of choice for information about how to use
-Stockfish with it.
+SugaR with it.
-This version of Stockfish supports up to 512 cores. The engine defaults
+This version of SugaR supports up to 128 cores. The engine defaults
to one search thread, so it is therefore recommended to inspect the value of
the *Threads* UCI parameter, and to make sure it equals the number of CPU
cores on your computer.
-This version of Stockfish has support for Syzygybases.
+This version of SugaR has support for Syzygybases.
### Files
-This distribution of Stockfish consists of the following files:
+This distribution of SugaR consists of the following files:
* Readme.md, the file you are currently reading.
* Copying.txt, a text file containing the GNU General Public License.
- * src, a subdirectory containing the full source code, including a Makefile
- that can be used to compile Stockfish on Unix-like systems.
+ * source, a subdirectory containing the full source code, including a Makefile
+ that can be used to compile SugaR on Unix-like systems.
### Syzygybases
@@ -84,40 +81,37 @@ the 50-move rule.
### Compiling it yourself
-On Unix-like systems, it should be possible to compile Stockfish
+On Unix-like systems, it should be possible to compile SugaR
directly from the source code with the included Makefile.
-Stockfish has support for 32 or 64-bit CPUs, the hardware POPCNT
+SugaR has support for 32 or 64-bit CPUs, the hardware POPCNT
instruction, big-endian machines such as Power PC, and other platforms.
+On Windows-like systems, it should be possible to compile SugaR
+directly from the source code with the included Sugar.sln with Visual Studio 15.3 Community
+from GUI or with command scenario using Visual Studio 15.3 Community Commands Shell.
+
In general it is recommended to run `make help` to see a list of make
targets with corresponding descriptions. When not using the Makefile to
-compile (for instance with Microsoft MSVC) you need to manually
-set/unset some switches in the compiler command line; see file *types.h*
+compile you need to manually
+set/unset some switches in the compiler command line or use MSVC solution and project files provided; see file *types.h*
for a quick reference.
-### Resource For Understanding the Code Base
-
-* [Chess Programming Wiki](https://chessprogramming.wikispaces.com) has good overall chess engines explanations
-(techniques used here are well explained like hash maps etc), it was
-also recommended by the [support team at stockfish.](http://support.stockfishchess.org/discussions/questions/1132-how-to-understand-stockfish-sources)
-
-* [Here](https://chessprogramming.wikispaces.com/Stockfish) you can find a set of features and techniques used by stockfish and each of them is explained at the wiki, however, it's a generic way rather than focusing on stockfish's own implementation, but it will still help you.
-
### Terms of use
-Stockfish is free, and distributed under the **GNU General Public License**
+SugaR is free, and distributed under the **GNU General Public License**
(GPL). Essentially, this means that you are free to do almost exactly
what you want with the program, including distributing it among your
friends, making it available for download from your web site, selling
it (either by itself or as part of some bigger software package), or
using it as the starting point for a software project of your own.
-The only real limitation is that whenever you distribute Stockfish in
+The only real limitation is that whenever you distribute SugaR in
some way, you must always include the full source code, or a pointer
to where the source code can be found. If you make any changes to the
source code, these changes must also be made available under the GPL.
For full details, read the copy of the GPL found in the file named
*Copying.txt*.
+
diff --git a/Engines/Linux32/mcbrain/SF-McBrain-v40_x32_linux b/Engines/Linux32/mcbrain/SF-McBrain-v40_x32_linux
deleted file mode 100644
index 564c126..0000000
Binary files a/Engines/Linux32/mcbrain/SF-McBrain-v40_x32_linux and /dev/null differ
diff --git a/Engines/Linux32/mcbrain/appveyor.yml b/Engines/Linux32/mcbrain/appveyor.yml
index c711dd6..4b5e9eb 100644
--- a/Engines/Linux32/mcbrain/appveyor.yml
+++ b/Engines/Linux32/mcbrain/appveyor.yml
@@ -34,19 +34,16 @@ before_build:
$src = get-childitem -Path *.cpp -Recurse | select -ExpandProperty FullName
$src = $src -join ' '
$src = $src.Replace("\", "/")
-
# Build CMakeLists.txt
$t = 'cmake_minimum_required(VERSION 3.8)',
'project(Stockfish)',
'set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/src)',
'set(source_files', $src, ')',
'add_executable(stockfish ${source_files})'
-
# Write CMakeLists.txt withouth BOM
$MyPath = (Get-Item -Path "." -Verbose).FullName + '\CMakeLists.txt'
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
[System.IO.File]::WriteAllLines($MyPath, $t, $Utf8NoBomEncoding)
-
# Obtain bench reference from git log
$b = git log HEAD | sls "\b[Bb]ench[ :]+[0-9]{7}" | select -first 1
$bench = $b -match '\D+(\d+)' | % { $matches[1] }
@@ -55,10 +52,8 @@ before_build:
If (${env:PLATFORM} -eq 'x64') { $g = $g + ' Win64' }
cmake -G "${g}" .
Write-Host "Generated files for: " $g
-
build_script:
- cmake --build . --config %CONFIGURATION% -- /verbosity:minimal
-
before_test:
- cd src/%CONFIGURATION%
- ps: |
@@ -68,4 +63,4 @@ before_test:
$r = ($s -match 'Nodes searched \D+(\d+)' | % { $matches[1] })
Write-Host "Engine bench:" $r
Write-Host "Reference bench:" $bench
- If ($r -ne $bench) { exit 1 }
+ If ($r -ne $bench) { exit 1 }
\ No newline at end of file
diff --git a/Engines/Linux32/mcbrain/src/.DS_Store b/Engines/Linux32/mcbrain/src/.DS_Store
index 5008ddf..ef9e3c3 100644
Binary files a/Engines/Linux32/mcbrain/src/.DS_Store and b/Engines/Linux32/mcbrain/src/.DS_Store differ
diff --git a/Engines/Linux32/mcbrain/src/.cproject b/Engines/Linux32/mcbrain/src/.cproject
new file mode 100644
index 0000000..54a0868
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/.cproject
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Engines/Linux32/mcbrain/src/.depend b/Engines/Linux32/mcbrain/src/.depend
new file mode 100644
index 0000000..bd25d9e
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/.depend
@@ -0,0 +1,52 @@
+benchmark.o: benchmark.cpp position.h bitboard.h types.h
+bitbase.o: bitbase.cpp bitboard.h types.h
+bitboard.o: bitboard.cpp bitboard.h types.h misc.h
+book.o: book.cpp book.h misc.h types.h position.h bitboard.h movegen.h
+endgame.o: endgame.cpp bitboard.h types.h endgame.h position.h movegen.h
+evaluate.o: evaluate.cpp bitboard.h types.h evaluate.h material.h \
+ endgame.h position.h misc.h pawns.h thread.h movepick.h movegen.h \
+ search.h thread_win32.h uci.h
+main.o: main.cpp bitboard.h types.h position.h search.h misc.h movepick.h \
+ movegen.h thread.h material.h endgame.h pawns.h thread_win32.h tt.h \
+ uci.h syzygy/tbprobe.h syzygy/../search.h polybook.h
+material.o: material.cpp material.h endgame.h position.h bitboard.h \
+ types.h misc.h thread.h movepick.h movegen.h pawns.h search.h \
+ thread_win32.h
+misc.o: misc.cpp misc.h types.h thread.h material.h endgame.h position.h \
+ bitboard.h movepick.h movegen.h pawns.h search.h thread_win32.h
+movegen.o: movegen.cpp movegen.h types.h position.h bitboard.h
+movepick.o: movepick.cpp movepick.h movegen.h types.h position.h \
+ bitboard.h
+pawns.o: pawns.cpp bitboard.h types.h pawns.h misc.h position.h thread.h \
+ material.h endgame.h movepick.h movegen.h search.h thread_win32.h
+position.o: position.cpp bitboard.h types.h misc.h movegen.h position.h \
+ thread.h material.h endgame.h movepick.h pawns.h search.h thread_win32.h \
+ tt.h uci.h syzygy/tbprobe.h syzygy/../search.h
+psqt.o: psqt.cpp types.h
+search.o: search.cpp book.h misc.h types.h position.h bitboard.h \
+ evaluate.h movegen.h movepick.h polybook.h search.h thread.h material.h \
+ endgame.h pawns.h thread_win32.h timeman.h tt.h uci.h syzygy/tbprobe.h \
+ syzygy/../search.h
+thread.o: thread.cpp movegen.h types.h search.h misc.h movepick.h \
+ position.h bitboard.h thread.h material.h endgame.h pawns.h \
+ thread_win32.h uci.h syzygy/tbprobe.h syzygy/../search.h tt.h
+timeman.o: timeman.cpp search.h misc.h types.h movepick.h movegen.h \
+ position.h bitboard.h timeman.h thread.h material.h endgame.h pawns.h \
+ thread_win32.h uci.h
+tt.o: tt.cpp uci.h types.h position.h bitboard.h thread.h material.h \
+ endgame.h misc.h movepick.h movegen.h pawns.h search.h thread_win32.h \
+ tt.h
+uci.o: uci.cpp evaluate.h types.h movegen.h position.h bitboard.h \
+ search.h misc.h movepick.h thread.h material.h endgame.h pawns.h \
+ thread_win32.h timeman.h tt.h uci.h syzygy/tbprobe.h syzygy/../search.h
+ucioption.o: ucioption.cpp misc.h types.h search.h movepick.h movegen.h \
+ position.h bitboard.h thread.h material.h endgame.h pawns.h \
+ thread_win32.h tt.h uci.h syzygy/tbprobe.h syzygy/../search.h polybook.h
+polybook.o: polybook.cpp polybook.h bitboard.h types.h position.h uci.h \
+ movegen.h thread.h material.h endgame.h misc.h movepick.h pawns.h \
+ search.h thread_win32.h
+tbprobe.o: syzygy/tbprobe.cpp syzygy/../bitboard.h syzygy/../types.h \
+ syzygy/../movegen.h syzygy/../position.h syzygy/../bitboard.h \
+ syzygy/../search.h syzygy/../misc.h syzygy/../movepick.h \
+ syzygy/../movegen.h syzygy/../position.h syzygy/../thread_win32.h \
+ syzygy/../types.h syzygy/../uci.h syzygy/tbprobe.h
diff --git a/Engines/Linux32/mcbrain/src/.project b/Engines/Linux32/mcbrain/src/.project
new file mode 100644
index 0000000..1c8747f
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/.project
@@ -0,0 +1,27 @@
+
+
+ SugaR
+
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.genmakebuilder
+ clean,full,incremental,
+
+
+
+
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder
+ full,incremental,
+
+
+
+
+
+ org.eclipse.cdt.core.cnature
+ org.eclipse.cdt.core.ccnature
+ org.eclipse.cdt.managedbuilder.core.managedBuildNature
+ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature
+
+
diff --git a/Engines/Linux32/mcbrain/src/Build x64 - Ubuntu Commands.txt b/Engines/Linux32/mcbrain/src/Build x64 - Ubuntu Commands.txt
new file mode 100644
index 0000000..5f78025
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/Build x64 - Ubuntu Commands.txt
@@ -0,0 +1,5 @@
+make clean
+make profile-build ARCH=x86-64 -j14
+strip McBrain
+
+
diff --git a/Engines/Linux32/mcbrain/src/Makefile b/Engines/Linux32/mcbrain/src/Makefile
index 8942f03..a2bf194 100644
--- a/Engines/Linux32/mcbrain/src/Makefile
+++ b/Engines/Linux32/mcbrain/src/Makefile
@@ -1,43 +1,59 @@
-# Stockfish, a UCI chess playing engine derived from Glaurung 2.1
-# Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
-# Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
-# Copyright (C) 2015-2018 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
-#
-# Stockfish is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# Stockfish is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see .
-
-
+### ==========================================================================
+### Copyright Notice and License Information
+### ==========================================================================
+# McBrain, a UCI chess playing engine derived from SugaR, Stockfish and Glaurung 2.1
+# Copyright (C) 2004-2008 Tord Romstad (Glaurung Author)
+# Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad (Stockfish Authors)
+# Copyright (C) 2015-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad (Stockfish Authors)
+# Copyright (C) 2017-2018 Michael Byrne, Marco Zerbinati, Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad (McBrain Authors)
+
+# McBrain is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# McBrain is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see .
### ==========================================================================
### Section 1. General Configuration
### ==========================================================================
### Executable name
+### McCain bench nodes 4717832
+### McBrain bench nodes 4576991
+VERSION=
+#VERSION=maverick
+ifeq ($(VERSION),maverick)
+CXXFLAGS += -DMaverick
ifeq ($(COMP),mingw)
-EXE = McBrain-91.exe
+EXE = McCain-v2.exe
else
-EXE = McBrain-91
+EXE = McCain-v2
+endif
+else
+CXXFLAGS += -DPAWN_SCORES
+ifeq ($(COMP),mingw)
+EXE = McBrain-v99.exe
+else
+EXE = McBrain-v99
+endif
endif
-##### bench nodes: 6045167
### Installation dir definitions
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
### Built-in benchmark for pgo-builds
-PGOBENCH = ./$(EXE) bench
+PGOBENCH = ./$(EXE) bench 16 1 10
+PGOBENCH2 = ./$(EXE) bench 16 2 8
### Object files
-OBJS = benchmark.o bitbase.o bitboard.o endgame.o evaluate.o main.o \
+OBJS = benchmark.o bitbase.o bitboard.o book.o endgame.o evaluate.o main.o \
material.o misc.o movegen.o movepick.o pawns.o position.o psqt.o \
search.o thread.o timeman.o tt.o uci.o ucioption.o polybook.o syzygy/tbprobe.o
@@ -160,6 +176,7 @@ ifeq ($(COMP),gcc)
CXXFLAGS += -pedantic -Wextra -Wshadow
ifeq ($(ARCH),armv7)
+ CXXFLAGS += -mcpu=cortex-a53 -mfloat-abi=hard -mfpu=neon-fp-armv8 -mneon-for-64bits -mtune=cortex-a53
ifeq ($(OS),Android)
CXXFLAGS += -m$(bits)
LDFLAGS += -m$(bits)
@@ -172,6 +189,9 @@ ifeq ($(COMP),gcc)
ifneq ($(KERNEL),Darwin)
LDFLAGS += -Wl,--no-as-needed
endif
+
+ gccversion=$(shell gcc --version)
+ gccmasqueraded=$(findstring clang,$(gccversion))
endif
ifeq ($(COMP),mingw)
@@ -334,15 +354,24 @@ endif
### needs access to the optimization flags.
ifeq ($(optimize),yes)
ifeq ($(debug), no)
- ifeq ($(comp),$(filter $(comp),gcc clang))
+ ifeq ($(comp),clang)
CXXFLAGS += -flto
LDFLAGS += $(CXXFLAGS)
endif
+ ifeq ($(comp),gcc)
+ CXXFLAGS += -flto
+ ifeq ($(gccmasqueraded),)
+ LDFLAGS += $(CXXFLAGS) -flto=jobserver
+ else
+ LDFLAGS += $(CXXFLAGS)
+ endif
+ endif
+
ifeq ($(comp),mingw)
ifeq ($(KERNEL),Linux)
CXXFLAGS += -flto
- LDFLAGS += $(CXXFLAGS)
+ LDFLAGS += $(CXXFLAGS) -flto=jobserver
endif
endif
endif
@@ -362,9 +391,13 @@ endif
help:
@echo ""
- @echo "To compile stockfish, type: "
+ @echo "To compile McBrain, type: "
+ @echo "'make ARCH=arch [COMP=compiler] [COMPCXX=cxx]'"
+ @echo " would be 'build' or 'profile-build'"
@echo ""
- @echo "make target ARCH=arch [COMP=compiler] [COMPCXX=cxx]"
+ @echo "To compile McCain, uncomment this line in the makefile: "
+ @echo "'### VERSION=maverick' by remvoing the 3 #(pound signs)"
+ @echo "then type: 'make ARCH=arch [COMP=compiler] [COMPCXX=cxx]'"
@echo ""
@echo "Supported targets:"
@echo ""
@@ -420,6 +453,7 @@ profile-build: config-sanity objclean profileclean
@echo ""
@echo "Step 2/4. Running benchmark for pgo-build ..."
$(PGOBENCH) > /dev/null
+ $(PGOBENCH2) > /dev/null
@echo ""
@echo "Step 3/4. Building optimized executable ..."
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) objclean
@@ -427,6 +461,9 @@ profile-build: config-sanity objclean profileclean
@echo ""
@echo "Step 4/4. Deleting profile data ..."
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) profileclean
+ strip $(EXE)
+# cp $(EXE) /Users/michaelbyrne/cluster.mfb
+# cp $(EXE) /opt/picochess/engines/armv7l
strip:
strip $(EXE)
@@ -436,13 +473,20 @@ install:
-cp $(EXE) $(BINDIR)
-strip $(BINDIR)/$(EXE)
+both:
+ VERSION=
+ ARCH=x86-64-modern
+ COMP=gcc
+ target=build
+ $(MAKE) $(target)
+
#clean all
clean: objclean profileclean
@rm -f .depend *~ core
# clean binaries and objects
objclean:
- @rm -f $(EXE) $(EXE).exe *.o ./syzygy/*.o
+ @rm -f $(EXE) *.o ./syzygy/*.o
# clean auxiliary profiling files
profileclean:
@@ -505,19 +549,19 @@ clang-profile-make:
clang-profile-use:
llvm-profdata merge -output=stockfish.profdata *.profraw
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
- EXTRACXXFLAGS='-fprofile-instr-use=stockfish.profdata' \
+ EXTRACXXFLAGS='-fprofile-instr-use=stockfish.profdata -Wno-profile-instr-out-of-date' \
EXTRALDFLAGS='-fprofile-use ' \
all
gcc-profile-make:
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
- EXTRACXXFLAGS='-fprofile-generate' \
+ EXTRACXXFLAGS='-fprofile-generate -fprofile-correction' \
EXTRALDFLAGS='-lgcov' \
all
gcc-profile-use:
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
- EXTRACXXFLAGS='-fprofile-use -fno-peel-loops -fno-tracer' \
+ EXTRACXXFLAGS='-fprofile-use -fprofile-correction -fno-peel-loops -fno-tracer' \
EXTRALDFLAGS='-lgcov' \
all
@@ -536,4 +580,3 @@ icc-profile-use:
-@$(CXX) $(DEPENDFLAGS) -MM $(OBJS:.o=.cpp) > $@ 2> /dev/null
-include .depend
-
diff --git a/Engines/Linux32/mcbrain/src/McBrain-92 b/Engines/Linux32/mcbrain/src/McBrain-92
deleted file mode 100644
index 2033719..0000000
Binary files a/Engines/Linux32/mcbrain/src/McBrain-92 and /dev/null differ
diff --git a/Engines/Linux32/mcbrain/src/McBrain-92 - test b/Engines/Linux32/mcbrain/src/McBrain-92 - test
deleted file mode 100644
index 9de862a..0000000
Binary files a/Engines/Linux32/mcbrain/src/McBrain-92 - test and /dev/null differ
diff --git a/Engines/Linux32/mcbrain/src/McBrain.sln b/Engines/Linux32/mcbrain/src/McBrain.sln
new file mode 100644
index 0000000..4b42ecd
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/McBrain.sln
@@ -0,0 +1,52 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26403.7
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sugar", "Sugar.vcxproj", "{2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release AVX|x64 = Release AVX|x64
+ Release AVX|x86 = Release AVX|x86
+ Release AVX2|x64 = Release AVX2|x64
+ Release AVX2|x86 = Release AVX2|x86
+ Release SSE|x64 = Release SSE|x64
+ Release SSE|x86 = Release SSE|x86
+ Release SSE2|x64 = Release SSE2|x64
+ Release SSE2|x86 = Release SSE2|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x64.ActiveCfg = Debug|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x64.Build.0 = Debug|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x64.Deploy.0 = Debug|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x86.ActiveCfg = Debug|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x86.Build.0 = Debug|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x64.ActiveCfg = Release AVX|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x64.Build.0 = Release AVX|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x86.ActiveCfg = Release AVX|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x86.Build.0 = Release AVX|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x64.ActiveCfg = Release AVX2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x64.Build.0 = Release AVX2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x86.ActiveCfg = Release AVX2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x86.Build.0 = Release AVX2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x64.ActiveCfg = Release SSE|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x64.Build.0 = Release SSE|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x86.ActiveCfg = Release SSE|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x86.Build.0 = Release SSE|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x64.ActiveCfg = Release SSE2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x64.Build.0 = Release SSE2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x86.ActiveCfg = Release SSE2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x86.Build.0 = Release SSE2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x64.ActiveCfg = Release|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x64.Build.0 = Release|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x86.ActiveCfg = Release|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Engines/Linux32/mcbrain/src/McBrain.vcxproj b/Engines/Linux32/mcbrain/src/McBrain.vcxproj
new file mode 100644
index 0000000..a8b3003
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/McBrain.vcxproj
@@ -0,0 +1,411 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release AVX2
+ Win32
+
+
+ Release AVX2
+ x64
+
+
+ Release AVX
+ Win32
+
+
+ Release AVX
+ x64
+
+
+ Release SSE2
+ Win32
+
+
+ Release SSE2
+ x64
+
+
+ Release SSE
+ Win32
+
+
+ Release SSE
+ x64
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}
+ Win32Proj
+ 10.0.10240.0
+
+
+
+ Application
+ true
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ true
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ v141
+
+
+ v141
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);DNO_PREFETCH;
+ MultiThreadedDebugDLL
+ Level3
+
+
+ MachineX86
+ Console
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+ StreamingSIMDExtensions
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);DNO_PREFETCH
+
+
+
+ Console
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreaded
+ AdvancedVectorExtensions2
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreaded
+ AdvancedVectorExtensions
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreaded
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+ MultiThreaded
+
+
+
+
+
+
+
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+ false
+ UseLinkTimeCodeGeneration
+
+
+ true
+ Speed
+ AnySuitable
+ true
+ StreamingSIMDExtensions2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Engines/Linux32/mcbrain/src/McBrain.vcxproj.filters b/Engines/Linux32/mcbrain/src/McBrain.vcxproj.filters
new file mode 100644
index 0000000..859ce91
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/McBrain.vcxproj.filters
@@ -0,0 +1,147 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {93995380-89BD-4b04-88EB-625FBE52EBFB}
+ h;hh;hpp;hxx;hm;inl;inc;xsd
+
+
+ {67DA6AB6-F800-4c08-8B7A-83BB121AAD01}
+ rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav
+
+
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
+
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
+
+
\ No newline at end of file
diff --git a/Engines/Linux32/mcbrain/src/McBrain.vcxproj.user b/Engines/Linux32/mcbrain/src/McBrain.vcxproj.user
new file mode 100644
index 0000000..5b610ed
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/McBrain.vcxproj.user
@@ -0,0 +1,6 @@
+
+
+
+ WindowsLocalDebugger
+
+
\ No newline at end of file
diff --git a/Engines/Linux32/mcbrain/src/McCain.sln b/Engines/Linux32/mcbrain/src/McCain.sln
new file mode 100644
index 0000000..4b42ecd
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/McCain.sln
@@ -0,0 +1,52 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26403.7
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Sugar", "Sugar.vcxproj", "{2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release AVX|x64 = Release AVX|x64
+ Release AVX|x86 = Release AVX|x86
+ Release AVX2|x64 = Release AVX2|x64
+ Release AVX2|x86 = Release AVX2|x86
+ Release SSE|x64 = Release SSE|x64
+ Release SSE|x86 = Release SSE|x86
+ Release SSE2|x64 = Release SSE2|x64
+ Release SSE2|x86 = Release SSE2|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x64.ActiveCfg = Debug|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x64.Build.0 = Debug|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x64.Deploy.0 = Debug|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x86.ActiveCfg = Debug|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Debug|x86.Build.0 = Debug|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x64.ActiveCfg = Release AVX|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x64.Build.0 = Release AVX|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x86.ActiveCfg = Release AVX|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX|x86.Build.0 = Release AVX|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x64.ActiveCfg = Release AVX2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x64.Build.0 = Release AVX2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x86.ActiveCfg = Release AVX2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release AVX2|x86.Build.0 = Release AVX2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x64.ActiveCfg = Release SSE|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x64.Build.0 = Release SSE|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x86.ActiveCfg = Release SSE|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE|x86.Build.0 = Release SSE|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x64.ActiveCfg = Release SSE2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x64.Build.0 = Release SSE2|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x86.ActiveCfg = Release SSE2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release SSE2|x86.Build.0 = Release SSE2|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x64.ActiveCfg = Release|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x64.Build.0 = Release|x64
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x86.ActiveCfg = Release|Win32
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Engines/Linux32/mcbrain/src/McCain.vcxproj b/Engines/Linux32/mcbrain/src/McCain.vcxproj
new file mode 100644
index 0000000..a8b3003
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/McCain.vcxproj
@@ -0,0 +1,411 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Release AVX2
+ Win32
+
+
+ Release AVX2
+ x64
+
+
+ Release AVX
+ Win32
+
+
+ Release AVX
+ x64
+
+
+ Release SSE2
+ Win32
+
+
+ Release SSE2
+ x64
+
+
+ Release SSE
+ Win32
+
+
+ Release SSE
+ x64
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {2EC0B847-72BD-4BD8-86E4-134DDF1FC85C}
+ Win32Proj
+ 10.0.10240.0
+
+
+
+ Application
+ true
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ true
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ Application
+ false
+ v141
+
+
+ v141
+
+
+ v141
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);DNO_PREFETCH;
+ MultiThreadedDebugDLL
+ Level3
+
+
+ MachineX86
+ Console
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+ WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreadedDLL
+ Level3
+ true
+ Speed
+ AnySuitable
+ true
+ StreamingSIMDExtensions
+
+
+ MachineX86
+ false
+ Console
+ true
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions);DNO_PREFETCH
+
+
+
+ Console
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreaded
+ AdvancedVectorExtensions2
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreaded
+ AdvancedVectorExtensions
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+
+ _WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions);DNDEBUG;DNO_PREFETCH
+ MultiThreaded
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+
+ Console
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+ MultiThreaded
+
+
+
+
+
+
+
+ Fast
+ true
+ Speed
+ AnySuitable
+ true
+ true
+
+
+ false
+ UseLinkTimeCodeGeneration
+
+
+
+
+ false
+ UseLinkTimeCodeGeneration
+
+
+ true
+ Speed
+ AnySuitable
+ true
+ StreamingSIMDExtensions2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Engines/Linux32/mcbrain/src/VersionHelpers.h b/Engines/Linux32/mcbrain/src/VersionHelpers.h
new file mode 100644
index 0000000..72e930b
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/VersionHelpers.h
@@ -0,0 +1,211 @@
+#ifndef VERSIONHELPER_H_INCLUDED
+#define VERSIONHELPER_H_INCLUDED
+
+#define VERSIONHELPERAPI inline bool
+
+#define _WIN32_WINNT_NT4 0x0400
+#define _WIN32_WINNT_WIN2K 0x0500
+#define _WIN32_WINNT_WINXP 0x0501
+#define _WIN32_WINNT_WS03 0x0502
+#define _WIN32_WINNT_WIN6 0x0600
+#define _WIN32_WINNT_VISTA 0x0600
+#define _WIN32_WINNT_WS08 0x0600
+#define _WIN32_WINNT_LONGHORN 0x0600
+#define _WIN32_WINNT_WIN7 0x0601
+#define _WIN32_WINNT_WIN8 0x0602
+#define _WIN32_WINNT_WINBLUE 0x0603
+#define _WIN32_WINNT_WIN10 0x0A00
+
+typedef LONG(NTAPI *fnRtlGetVersion)(PRTL_OSVERSIONINFOEXW lpVersionInformation);
+
+enum eVerShort
+{
+ WinUnsupported, // Unsupported OS
+ WinXP, // Windows XP
+ Win7, // Windows 7
+ Win8, // Windows 8
+ Win8Point1, // Windows 8.1
+ Win10, // Windows 10
+ Win10AU, // Windows 10 Anniversary update
+ Win10CU // Windows 10 Creators update
+};
+
+struct WinVersion
+{
+ eVerShort ver = WinUnsupported;
+ RTL_OSVERSIONINFOEXW native;
+};
+
+inline WinVersion& WinVer()
+{
+ static WinVersion g_WinVer;
+ return g_WinVer;
+}
+
+inline void InitVersion()
+{
+ auto& g_WinVer = WinVer();
+ g_WinVer.native.dwOSVersionInfoSize = sizeof(g_WinVer.native);
+ auto RtlGetVersion = (fnRtlGetVersion)GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "RtlGetVersion");
+ if (RtlGetVersion)
+ RtlGetVersion(&g_WinVer.native);
+
+ if (g_WinVer.native.dwMajorVersion != 0)
+ {
+ auto fullver = (g_WinVer.native.dwMajorVersion << 8) | g_WinVer.native.dwMinorVersion;
+ switch (fullver)
+ {
+ case _WIN32_WINNT_WIN10:
+ if (g_WinVer.native.dwBuildNumber >= 15063)
+ g_WinVer.ver = Win10CU;
+ else if (g_WinVer.native.dwBuildNumber >= 14393)
+ g_WinVer.ver = Win10AU;
+ else if (g_WinVer.native.dwBuildNumber >= 10586)
+ g_WinVer.ver = Win10;
+ break;
+
+ case _WIN32_WINNT_WINBLUE:
+ g_WinVer.ver = Win8Point1;
+ break;
+
+ case _WIN32_WINNT_WIN8:
+ g_WinVer.ver = Win8;
+ break;
+
+ case _WIN32_WINNT_WIN7:
+ g_WinVer.ver = Win7;
+ break;
+
+ case _WIN32_WINNT_WINXP:
+ g_WinVer.ver = WinXP;
+ break;
+
+ default:
+ g_WinVer.ver = WinUnsupported;
+ }
+ }
+}
+
+
+VERSIONHELPERAPI
+IsWindowsVersionOrGreater(WORD wMajorVersion, WORD wMinorVersion, WORD wServicePackMajor, DWORD dwBuild)
+{
+ auto& g_WinVer = WinVer();
+ if (g_WinVer.native.dwMajorVersion != 0)
+ {
+ if (g_WinVer.native.dwMajorVersion > wMajorVersion)
+ return true;
+ else if (g_WinVer.native.dwMajorVersion < wMajorVersion)
+ return false;
+
+ if (g_WinVer.native.dwMinorVersion > wMinorVersion)
+ return true;
+ else if (g_WinVer.native.dwMinorVersion < wMinorVersion)
+ return false;
+
+ if (g_WinVer.native.wServicePackMajor > wServicePackMajor)
+ return true;
+ else if (g_WinVer.native.wServicePackMajor < wServicePackMajor)
+ return false;
+
+ if (g_WinVer.native.dwBuildNumber >= dwBuild)
+ return true;
+ }
+
+ return false;
+}
+
+VERSIONHELPERAPI
+IsWindowsXPOrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0, 0);
+}
+
+VERSIONHELPERAPI
+IsWindowsXPSP1OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 1, 0);
+}
+
+VERSIONHELPERAPI
+IsWindowsXPSP2OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 2, 0);
+}
+
+VERSIONHELPERAPI
+IsWindowsXPSP3OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 3, 0);
+}
+
+VERSIONHELPERAPI
+IsWindowsVistaOrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0, 0);
+}
+
+VERSIONHELPERAPI
+IsWindowsVistaSP1OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 1, 0);
+}
+
+VERSIONHELPERAPI
+IsWindowsVistaSP2OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 2, 0);
+}
+
+VERSIONHELPERAPI
+IsWindows7OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 0, 0);
+}
+
+VERSIONHELPERAPI
+IsWindows7SP1OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN32_WINNT_WIN7), 1, 0);
+}
+
+VERSIONHELPERAPI
+IsWindows8OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN8), LOBYTE(_WIN32_WINNT_WIN8), 0, 0);
+}
+
+VERSIONHELPERAPI
+IsWindows8Point1OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINBLUE), LOBYTE(_WIN32_WINNT_WINBLUE), 0, 0);
+}
+
+VERSIONHELPERAPI
+IsWindows10OrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN10), LOBYTE(_WIN32_WINNT_WIN10), 0, 0);
+}
+
+VERSIONHELPERAPI
+IsWindows10AnniversaryOrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN10), LOBYTE(_WIN32_WINNT_WIN10), 0, 14393);
+}
+
+VERSIONHELPERAPI
+IsWindows10CreatorsOrGreater()
+{
+ return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN10), LOBYTE(_WIN32_WINNT_WIN10), 0, 15063);
+}
+
+VERSIONHELPERAPI
+IsWindowsServer()
+{
+ OSVERSIONINFOEXW osvi = { sizeof(osvi), 0, 0, 0, 0,{ 0 }, 0, 0, 0, VER_NT_WORKSTATION, 0 };
+ DWORDLONG const dwlConditionMask = VerSetConditionMask(0, VER_PRODUCT_TYPE, VER_EQUAL);
+
+ return !VerifyVersionInfoW(&osvi, VER_PRODUCT_TYPE, dwlConditionMask);
+}
+
+#endif
\ No newline at end of file
diff --git a/Engines/Linux32/mcbrain/src/benchmark.cpp b/Engines/Linux32/mcbrain/src/benchmark.cpp
index 807f9de..1b792dd 100644
--- a/Engines/Linux32/mcbrain/src/benchmark.cpp
+++ b/Engines/Linux32/mcbrain/src/benchmark.cpp
@@ -91,13 +91,13 @@ const vector Defaults = {
} // namespace
/// setup_bench() builds a list of UCI commands to be run by bench. There
-/// are five parameters: TT size in MB, number of search threads that
+/// are five parameters: TT size in MiB, number of search threads that
/// should be used, the limit value spent for each position, a file name
/// where to look for positions in FEN format and the type of the limit:
/// depth, perft, nodes and movetime (in millisecs).
///
/// bench -> search default positions up to depth 13
-/// bench 64 1 15 -> search default positions up to depth 15 (TT = 64MB)
+/// bench 64 1 15 -> search default positions up to depth 15 (TT = 64MiB)
/// bench 64 4 5000 current movetime -> search current position with 4 threads for 5 sec
/// bench 64 1 100000 default nodes -> search default positions for 100K nodes each
/// bench 16 1 5 default perft -> run a perft 5 on default positions
diff --git a/Engines/Linux32/mcbrain/src/bitboard.cpp b/Engines/Linux32/mcbrain/src/bitboard.cpp
index c3e06b1..0d676a5 100644
--- a/Engines/Linux32/mcbrain/src/bitboard.cpp
+++ b/Engines/Linux32/mcbrain/src/bitboard.cpp
@@ -44,7 +44,7 @@ Bitboard PawnAttacks[COLOR_NB][SQUARE_NB];
Magic RookMagics[SQUARE_NB];
Magic BishopMagics[SQUARE_NB];
-namespace {
+namespace { //Niklas Fiekas
Bitboard AttackTable[HasPext ? 107648 : 88772] = { 0 };
@@ -231,7 +231,7 @@ void Bitboards::init() {
PopCnt16[i] = (uint8_t) popcount16(i);
for (Square s = SQ_A1; s <= SQ_H8; ++s)
- SquareBB[s] = make_bitboard(s);
+ SquareBB[s] = (1ULL << s);
for (File f = FILE_A; f <= FILE_H; ++f)
FileBB[f] = f > FILE_A ? FileBB[f - 1] << 1 : FileABB;
@@ -258,7 +258,7 @@ void Bitboards::init() {
if (s1 != s2)
{
SquareDistance[s1][s2] = std::max(distance(s1, s2), distance(s1, s2));
- DistanceRingBB[s1][SquareDistance[s1][s2] - 1] |= s2;
+ DistanceRingBB[s1][SquareDistance[s1][s2]] |= s2;
}
int steps[][5] = { {}, { 7, 9 }, { 6, 10, 15, 17 }, {}, {}, {}, { 1, 7, 8, 9 } };
@@ -279,7 +279,7 @@ void Bitboards::init() {
}
}
- Direction RookDirections[] = { NORTH, EAST, SOUTH, WEST };
+ Direction RookDirections[] = { NORTH, EAST, SOUTH, WEST };
Direction BishopDirections[] = { NORTH_EAST, SOUTH_EAST, SOUTH_WEST, NORTH_WEST };
if (HasPext)
@@ -348,8 +348,8 @@ namespace {
// init_magics() computes all rook and bishop attacks at startup. Magic
// bitboards are used to look up attacks of sliding pieces. As a reference see
- // chessprogramming.wikispaces.com/Magic+Bitboards. In particular, we use
- // precomputed fixed shift magics.
+ // chessprogramming.wikispaces.com/Magic+Bitboards. In particular, here we
+ // use the so called "fancy" approach.
template
void init_magics(MagicInit init[], Magic magics[], Direction directions[]) {
diff --git a/Engines/Linux32/mcbrain/src/bitboard.h b/Engines/Linux32/mcbrain/src/bitboard.h
index 0e7cabb..0a3816c 100644
--- a/Engines/Linux32/mcbrain/src/bitboard.h
+++ b/Engines/Linux32/mcbrain/src/bitboard.h
@@ -153,16 +153,6 @@ inline Bitboard file_bb(Square s) {
}
-/// make_bitboard() returns a bitboard from a list of squares
-
-constexpr Bitboard make_bitboard() { return 0; }
-
-template
-constexpr Bitboard make_bitboard(Square s, Squares... squares) {
- return (1ULL << s) | make_bitboard(squares...);
-}
-
-
/// shift() moves a bitboard one step along direction D (mainly for pawns)
template
@@ -338,6 +328,7 @@ inline Square msb(Bitboard b) {
}
#else // MSVC, WIN32
+#include
inline Square lsb(Bitboard b) {
assert(b);
diff --git a/Engines/Linux32/mcbrain/src/book.cpp b/Engines/Linux32/mcbrain/src/book.cpp
new file mode 100644
index 0000000..644e010
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/book.cpp
@@ -0,0 +1,479 @@
+/*
+ SugaR, a UCI chess playing engine derived from Stockfish
+ Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
+ Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad
+ Copyright (C) 2015-2017 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad
+
+ SugaR is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ SugaR is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+*/
+
+/*
+ The code in this file is based on the opening book code in PolyGlot
+ by Fabien Letouzey. PolyGlot is available under the GNU General
+ Public License, and can be downloaded from http://wbec-ridderkerk.nl
+ */
+
+#include
+#include
+
+#include "book.h"
+#include "misc.h"
+#include "movegen.h"
+
+using namespace std;
+
+namespace {
+
+ // A Polyglot book is a series of "entries" of 16 bytes. All integers are
+ // stored in big-endian format, with the highest byte first (regardless of
+ // size). The entries are ordered according to the key in ascending order.
+ struct Entry {
+ uint64_t key;
+ uint16_t move;
+ uint16_t count;
+ uint32_t learn;
+ };
+
+ // Random numbers from PolyGlot, used to compute book hash keys
+ const union {
+ Key PolyGlotRandoms[781];
+ struct {
+ Key psq[12][64]; // [piece][square]
+ Key castling[4]; // [castling flag]
+ Key enpassant[8]; // [file]
+ Key turn;
+ } Zobrist;
+ } PG = {{
+ 0x9D39247E33776D41ULL, 0x2AF7398005AAA5C7ULL, 0x44DB015024623547ULL,
+ 0x9C15F73E62A76AE2ULL, 0x75834465489C0C89ULL, 0x3290AC3A203001BFULL,
+ 0x0FBBAD1F61042279ULL, 0xE83A908FF2FB60CAULL, 0x0D7E765D58755C10ULL,
+ 0x1A083822CEAFE02DULL, 0x9605D5F0E25EC3B0ULL, 0xD021FF5CD13A2ED5ULL,
+ 0x40BDF15D4A672E32ULL, 0x011355146FD56395ULL, 0x5DB4832046F3D9E5ULL,
+ 0x239F8B2D7FF719CCULL, 0x05D1A1AE85B49AA1ULL, 0x679F848F6E8FC971ULL,
+ 0x7449BBFF801FED0BULL, 0x7D11CDB1C3B7ADF0ULL, 0x82C7709E781EB7CCULL,
+ 0xF3218F1C9510786CULL, 0x331478F3AF51BBE6ULL, 0x4BB38DE5E7219443ULL,
+ 0xAA649C6EBCFD50FCULL, 0x8DBD98A352AFD40BULL, 0x87D2074B81D79217ULL,
+ 0x19F3C751D3E92AE1ULL, 0xB4AB30F062B19ABFULL, 0x7B0500AC42047AC4ULL,
+ 0xC9452CA81A09D85DULL, 0x24AA6C514DA27500ULL, 0x4C9F34427501B447ULL,
+ 0x14A68FD73C910841ULL, 0xA71B9B83461CBD93ULL, 0x03488B95B0F1850FULL,
+ 0x637B2B34FF93C040ULL, 0x09D1BC9A3DD90A94ULL, 0x3575668334A1DD3BULL,
+ 0x735E2B97A4C45A23ULL, 0x18727070F1BD400BULL, 0x1FCBACD259BF02E7ULL,
+ 0xD310A7C2CE9B6555ULL, 0xBF983FE0FE5D8244ULL, 0x9F74D14F7454A824ULL,
+ 0x51EBDC4AB9BA3035ULL, 0x5C82C505DB9AB0FAULL, 0xFCF7FE8A3430B241ULL,
+ 0x3253A729B9BA3DDEULL, 0x8C74C368081B3075ULL, 0xB9BC6C87167C33E7ULL,
+ 0x7EF48F2B83024E20ULL, 0x11D505D4C351BD7FULL, 0x6568FCA92C76A243ULL,
+ 0x4DE0B0F40F32A7B8ULL, 0x96D693460CC37E5DULL, 0x42E240CB63689F2FULL,
+ 0x6D2BDCDAE2919661ULL, 0x42880B0236E4D951ULL, 0x5F0F4A5898171BB6ULL,
+ 0x39F890F579F92F88ULL, 0x93C5B5F47356388BULL, 0x63DC359D8D231B78ULL,
+ 0xEC16CA8AEA98AD76ULL, 0x5355F900C2A82DC7ULL, 0x07FB9F855A997142ULL,
+ 0x5093417AA8A7ED5EULL, 0x7BCBC38DA25A7F3CULL, 0x19FC8A768CF4B6D4ULL,
+ 0x637A7780DECFC0D9ULL, 0x8249A47AEE0E41F7ULL, 0x79AD695501E7D1E8ULL,
+ 0x14ACBAF4777D5776ULL, 0xF145B6BECCDEA195ULL, 0xDABF2AC8201752FCULL,
+ 0x24C3C94DF9C8D3F6ULL, 0xBB6E2924F03912EAULL, 0x0CE26C0B95C980D9ULL,
+ 0xA49CD132BFBF7CC4ULL, 0xE99D662AF4243939ULL, 0x27E6AD7891165C3FULL,
+ 0x8535F040B9744FF1ULL, 0x54B3F4FA5F40D873ULL, 0x72B12C32127FED2BULL,
+ 0xEE954D3C7B411F47ULL, 0x9A85AC909A24EAA1ULL, 0x70AC4CD9F04F21F5ULL,
+ 0xF9B89D3E99A075C2ULL, 0x87B3E2B2B5C907B1ULL, 0xA366E5B8C54F48B8ULL,
+ 0xAE4A9346CC3F7CF2ULL, 0x1920C04D47267BBDULL, 0x87BF02C6B49E2AE9ULL,
+ 0x092237AC237F3859ULL, 0xFF07F64EF8ED14D0ULL, 0x8DE8DCA9F03CC54EULL,
+ 0x9C1633264DB49C89ULL, 0xB3F22C3D0B0B38EDULL, 0x390E5FB44D01144BULL,
+ 0x5BFEA5B4712768E9ULL, 0x1E1032911FA78984ULL, 0x9A74ACB964E78CB3ULL,
+ 0x4F80F7A035DAFB04ULL, 0x6304D09A0B3738C4ULL, 0x2171E64683023A08ULL,
+ 0x5B9B63EB9CEFF80CULL, 0x506AACF489889342ULL, 0x1881AFC9A3A701D6ULL,
+ 0x6503080440750644ULL, 0xDFD395339CDBF4A7ULL, 0xEF927DBCF00C20F2ULL,
+ 0x7B32F7D1E03680ECULL, 0xB9FD7620E7316243ULL, 0x05A7E8A57DB91B77ULL,
+ 0xB5889C6E15630A75ULL, 0x4A750A09CE9573F7ULL, 0xCF464CEC899A2F8AULL,
+ 0xF538639CE705B824ULL, 0x3C79A0FF5580EF7FULL, 0xEDE6C87F8477609DULL,
+ 0x799E81F05BC93F31ULL, 0x86536B8CF3428A8CULL, 0x97D7374C60087B73ULL,
+ 0xA246637CFF328532ULL, 0x043FCAE60CC0EBA0ULL, 0x920E449535DD359EULL,
+ 0x70EB093B15B290CCULL, 0x73A1921916591CBDULL, 0x56436C9FE1A1AA8DULL,
+ 0xEFAC4B70633B8F81ULL, 0xBB215798D45DF7AFULL, 0x45F20042F24F1768ULL,
+ 0x930F80F4E8EB7462ULL, 0xFF6712FFCFD75EA1ULL, 0xAE623FD67468AA70ULL,
+ 0xDD2C5BC84BC8D8FCULL, 0x7EED120D54CF2DD9ULL, 0x22FE545401165F1CULL,
+ 0xC91800E98FB99929ULL, 0x808BD68E6AC10365ULL, 0xDEC468145B7605F6ULL,
+ 0x1BEDE3A3AEF53302ULL, 0x43539603D6C55602ULL, 0xAA969B5C691CCB7AULL,
+ 0xA87832D392EFEE56ULL, 0x65942C7B3C7E11AEULL, 0xDED2D633CAD004F6ULL,
+ 0x21F08570F420E565ULL, 0xB415938D7DA94E3CULL, 0x91B859E59ECB6350ULL,
+ 0x10CFF333E0ED804AULL, 0x28AED140BE0BB7DDULL, 0xC5CC1D89724FA456ULL,
+ 0x5648F680F11A2741ULL, 0x2D255069F0B7DAB3ULL, 0x9BC5A38EF729ABD4ULL,
+ 0xEF2F054308F6A2BCULL, 0xAF2042F5CC5C2858ULL, 0x480412BAB7F5BE2AULL,
+ 0xAEF3AF4A563DFE43ULL, 0x19AFE59AE451497FULL, 0x52593803DFF1E840ULL,
+ 0xF4F076E65F2CE6F0ULL, 0x11379625747D5AF3ULL, 0xBCE5D2248682C115ULL,
+ 0x9DA4243DE836994FULL, 0x066F70B33FE09017ULL, 0x4DC4DE189B671A1CULL,
+ 0x51039AB7712457C3ULL, 0xC07A3F80C31FB4B4ULL, 0xB46EE9C5E64A6E7CULL,
+ 0xB3819A42ABE61C87ULL, 0x21A007933A522A20ULL, 0x2DF16F761598AA4FULL,
+ 0x763C4A1371B368FDULL, 0xF793C46702E086A0ULL, 0xD7288E012AEB8D31ULL,
+ 0xDE336A2A4BC1C44BULL, 0x0BF692B38D079F23ULL, 0x2C604A7A177326B3ULL,
+ 0x4850E73E03EB6064ULL, 0xCFC447F1E53C8E1BULL, 0xB05CA3F564268D99ULL,
+ 0x9AE182C8BC9474E8ULL, 0xA4FC4BD4FC5558CAULL, 0xE755178D58FC4E76ULL,
+ 0x69B97DB1A4C03DFEULL, 0xF9B5B7C4ACC67C96ULL, 0xFC6A82D64B8655FBULL,
+ 0x9C684CB6C4D24417ULL, 0x8EC97D2917456ED0ULL, 0x6703DF9D2924E97EULL,
+ 0xC547F57E42A7444EULL, 0x78E37644E7CAD29EULL, 0xFE9A44E9362F05FAULL,
+ 0x08BD35CC38336615ULL, 0x9315E5EB3A129ACEULL, 0x94061B871E04DF75ULL,
+ 0xDF1D9F9D784BA010ULL, 0x3BBA57B68871B59DULL, 0xD2B7ADEEDED1F73FULL,
+ 0xF7A255D83BC373F8ULL, 0xD7F4F2448C0CEB81ULL, 0xD95BE88CD210FFA7ULL,
+ 0x336F52F8FF4728E7ULL, 0xA74049DAC312AC71ULL, 0xA2F61BB6E437FDB5ULL,
+ 0x4F2A5CB07F6A35B3ULL, 0x87D380BDA5BF7859ULL, 0x16B9F7E06C453A21ULL,
+ 0x7BA2484C8A0FD54EULL, 0xF3A678CAD9A2E38CULL, 0x39B0BF7DDE437BA2ULL,
+ 0xFCAF55C1BF8A4424ULL, 0x18FCF680573FA594ULL, 0x4C0563B89F495AC3ULL,
+ 0x40E087931A00930DULL, 0x8CFFA9412EB642C1ULL, 0x68CA39053261169FULL,
+ 0x7A1EE967D27579E2ULL, 0x9D1D60E5076F5B6FULL, 0x3810E399B6F65BA2ULL,
+ 0x32095B6D4AB5F9B1ULL, 0x35CAB62109DD038AULL, 0xA90B24499FCFAFB1ULL,
+ 0x77A225A07CC2C6BDULL, 0x513E5E634C70E331ULL, 0x4361C0CA3F692F12ULL,
+ 0xD941ACA44B20A45BULL, 0x528F7C8602C5807BULL, 0x52AB92BEB9613989ULL,
+ 0x9D1DFA2EFC557F73ULL, 0x722FF175F572C348ULL, 0x1D1260A51107FE97ULL,
+ 0x7A249A57EC0C9BA2ULL, 0x04208FE9E8F7F2D6ULL, 0x5A110C6058B920A0ULL,
+ 0x0CD9A497658A5698ULL, 0x56FD23C8F9715A4CULL, 0x284C847B9D887AAEULL,
+ 0x04FEABFBBDB619CBULL, 0x742E1E651C60BA83ULL, 0x9A9632E65904AD3CULL,
+ 0x881B82A13B51B9E2ULL, 0x506E6744CD974924ULL, 0xB0183DB56FFC6A79ULL,
+ 0x0ED9B915C66ED37EULL, 0x5E11E86D5873D484ULL, 0xF678647E3519AC6EULL,
+ 0x1B85D488D0F20CC5ULL, 0xDAB9FE6525D89021ULL, 0x0D151D86ADB73615ULL,
+ 0xA865A54EDCC0F019ULL, 0x93C42566AEF98FFBULL, 0x99E7AFEABE000731ULL,
+ 0x48CBFF086DDF285AULL, 0x7F9B6AF1EBF78BAFULL, 0x58627E1A149BBA21ULL,
+ 0x2CD16E2ABD791E33ULL, 0xD363EFF5F0977996ULL, 0x0CE2A38C344A6EEDULL,
+ 0x1A804AADB9CFA741ULL, 0x907F30421D78C5DEULL, 0x501F65EDB3034D07ULL,
+ 0x37624AE5A48FA6E9ULL, 0x957BAF61700CFF4EULL, 0x3A6C27934E31188AULL,
+ 0xD49503536ABCA345ULL, 0x088E049589C432E0ULL, 0xF943AEE7FEBF21B8ULL,
+ 0x6C3B8E3E336139D3ULL, 0x364F6FFA464EE52EULL, 0xD60F6DCEDC314222ULL,
+ 0x56963B0DCA418FC0ULL, 0x16F50EDF91E513AFULL, 0xEF1955914B609F93ULL,
+ 0x565601C0364E3228ULL, 0xECB53939887E8175ULL, 0xBAC7A9A18531294BULL,
+ 0xB344C470397BBA52ULL, 0x65D34954DAF3CEBDULL, 0xB4B81B3FA97511E2ULL,
+ 0xB422061193D6F6A7ULL, 0x071582401C38434DULL, 0x7A13F18BBEDC4FF5ULL,
+ 0xBC4097B116C524D2ULL, 0x59B97885E2F2EA28ULL, 0x99170A5DC3115544ULL,
+ 0x6F423357E7C6A9F9ULL, 0x325928EE6E6F8794ULL, 0xD0E4366228B03343ULL,
+ 0x565C31F7DE89EA27ULL, 0x30F5611484119414ULL, 0xD873DB391292ED4FULL,
+ 0x7BD94E1D8E17DEBCULL, 0xC7D9F16864A76E94ULL, 0x947AE053EE56E63CULL,
+ 0xC8C93882F9475F5FULL, 0x3A9BF55BA91F81CAULL, 0xD9A11FBB3D9808E4ULL,
+ 0x0FD22063EDC29FCAULL, 0xB3F256D8ACA0B0B9ULL, 0xB03031A8B4516E84ULL,
+ 0x35DD37D5871448AFULL, 0xE9F6082B05542E4EULL, 0xEBFAFA33D7254B59ULL,
+ 0x9255ABB50D532280ULL, 0xB9AB4CE57F2D34F3ULL, 0x693501D628297551ULL,
+ 0xC62C58F97DD949BFULL, 0xCD454F8F19C5126AULL, 0xBBE83F4ECC2BDECBULL,
+ 0xDC842B7E2819E230ULL, 0xBA89142E007503B8ULL, 0xA3BC941D0A5061CBULL,
+ 0xE9F6760E32CD8021ULL, 0x09C7E552BC76492FULL, 0x852F54934DA55CC9ULL,
+ 0x8107FCCF064FCF56ULL, 0x098954D51FFF6580ULL, 0x23B70EDB1955C4BFULL,
+ 0xC330DE426430F69DULL, 0x4715ED43E8A45C0AULL, 0xA8D7E4DAB780A08DULL,
+ 0x0572B974F03CE0BBULL, 0xB57D2E985E1419C7ULL, 0xE8D9ECBE2CF3D73FULL,
+ 0x2FE4B17170E59750ULL, 0x11317BA87905E790ULL, 0x7FBF21EC8A1F45ECULL,
+ 0x1725CABFCB045B00ULL, 0x964E915CD5E2B207ULL, 0x3E2B8BCBF016D66DULL,
+ 0xBE7444E39328A0ACULL, 0xF85B2B4FBCDE44B7ULL, 0x49353FEA39BA63B1ULL,
+ 0x1DD01AAFCD53486AULL, 0x1FCA8A92FD719F85ULL, 0xFC7C95D827357AFAULL,
+ 0x18A6A990C8B35EBDULL, 0xCCCB7005C6B9C28DULL, 0x3BDBB92C43B17F26ULL,
+ 0xAA70B5B4F89695A2ULL, 0xE94C39A54A98307FULL, 0xB7A0B174CFF6F36EULL,
+ 0xD4DBA84729AF48ADULL, 0x2E18BC1AD9704A68ULL, 0x2DE0966DAF2F8B1CULL,
+ 0xB9C11D5B1E43A07EULL, 0x64972D68DEE33360ULL, 0x94628D38D0C20584ULL,
+ 0xDBC0D2B6AB90A559ULL, 0xD2733C4335C6A72FULL, 0x7E75D99D94A70F4DULL,
+ 0x6CED1983376FA72BULL, 0x97FCAACBF030BC24ULL, 0x7B77497B32503B12ULL,
+ 0x8547EDDFB81CCB94ULL, 0x79999CDFF70902CBULL, 0xCFFE1939438E9B24ULL,
+ 0x829626E3892D95D7ULL, 0x92FAE24291F2B3F1ULL, 0x63E22C147B9C3403ULL,
+ 0xC678B6D860284A1CULL, 0x5873888850659AE7ULL, 0x0981DCD296A8736DULL,
+ 0x9F65789A6509A440ULL, 0x9FF38FED72E9052FULL, 0xE479EE5B9930578CULL,
+ 0xE7F28ECD2D49EECDULL, 0x56C074A581EA17FEULL, 0x5544F7D774B14AEFULL,
+ 0x7B3F0195FC6F290FULL, 0x12153635B2C0CF57ULL, 0x7F5126DBBA5E0CA7ULL,
+ 0x7A76956C3EAFB413ULL, 0x3D5774A11D31AB39ULL, 0x8A1B083821F40CB4ULL,
+ 0x7B4A38E32537DF62ULL, 0x950113646D1D6E03ULL, 0x4DA8979A0041E8A9ULL,
+ 0x3BC36E078F7515D7ULL, 0x5D0A12F27AD310D1ULL, 0x7F9D1A2E1EBE1327ULL,
+ 0xDA3A361B1C5157B1ULL, 0xDCDD7D20903D0C25ULL, 0x36833336D068F707ULL,
+ 0xCE68341F79893389ULL, 0xAB9090168DD05F34ULL, 0x43954B3252DC25E5ULL,
+ 0xB438C2B67F98E5E9ULL, 0x10DCD78E3851A492ULL, 0xDBC27AB5447822BFULL,
+ 0x9B3CDB65F82CA382ULL, 0xB67B7896167B4C84ULL, 0xBFCED1B0048EAC50ULL,
+ 0xA9119B60369FFEBDULL, 0x1FFF7AC80904BF45ULL, 0xAC12FB171817EEE7ULL,
+ 0xAF08DA9177DDA93DULL, 0x1B0CAB936E65C744ULL, 0xB559EB1D04E5E932ULL,
+ 0xC37B45B3F8D6F2BAULL, 0xC3A9DC228CAAC9E9ULL, 0xF3B8B6675A6507FFULL,
+ 0x9FC477DE4ED681DAULL, 0x67378D8ECCEF96CBULL, 0x6DD856D94D259236ULL,
+ 0xA319CE15B0B4DB31ULL, 0x073973751F12DD5EULL, 0x8A8E849EB32781A5ULL,
+ 0xE1925C71285279F5ULL, 0x74C04BF1790C0EFEULL, 0x4DDA48153C94938AULL,
+ 0x9D266D6A1CC0542CULL, 0x7440FB816508C4FEULL, 0x13328503DF48229FULL,
+ 0xD6BF7BAEE43CAC40ULL, 0x4838D65F6EF6748FULL, 0x1E152328F3318DEAULL,
+ 0x8F8419A348F296BFULL, 0x72C8834A5957B511ULL, 0xD7A023A73260B45CULL,
+ 0x94EBC8ABCFB56DAEULL, 0x9FC10D0F989993E0ULL, 0xDE68A2355B93CAE6ULL,
+ 0xA44CFE79AE538BBEULL, 0x9D1D84FCCE371425ULL, 0x51D2B1AB2DDFB636ULL,
+ 0x2FD7E4B9E72CD38CULL, 0x65CA5B96B7552210ULL, 0xDD69A0D8AB3B546DULL,
+ 0x604D51B25FBF70E2ULL, 0x73AA8A564FB7AC9EULL, 0x1A8C1E992B941148ULL,
+ 0xAAC40A2703D9BEA0ULL, 0x764DBEAE7FA4F3A6ULL, 0x1E99B96E70A9BE8BULL,
+ 0x2C5E9DEB57EF4743ULL, 0x3A938FEE32D29981ULL, 0x26E6DB8FFDF5ADFEULL,
+ 0x469356C504EC9F9DULL, 0xC8763C5B08D1908CULL, 0x3F6C6AF859D80055ULL,
+ 0x7F7CC39420A3A545ULL, 0x9BFB227EBDF4C5CEULL, 0x89039D79D6FC5C5CULL,
+ 0x8FE88B57305E2AB6ULL, 0xA09E8C8C35AB96DEULL, 0xFA7E393983325753ULL,
+ 0xD6B6D0ECC617C699ULL, 0xDFEA21EA9E7557E3ULL, 0xB67C1FA481680AF8ULL,
+ 0xCA1E3785A9E724E5ULL, 0x1CFC8BED0D681639ULL, 0xD18D8549D140CAEAULL,
+ 0x4ED0FE7E9DC91335ULL, 0xE4DBF0634473F5D2ULL, 0x1761F93A44D5AEFEULL,
+ 0x53898E4C3910DA55ULL, 0x734DE8181F6EC39AULL, 0x2680B122BAA28D97ULL,
+ 0x298AF231C85BAFABULL, 0x7983EED3740847D5ULL, 0x66C1A2A1A60CD889ULL,
+ 0x9E17E49642A3E4C1ULL, 0xEDB454E7BADC0805ULL, 0x50B704CAB602C329ULL,
+ 0x4CC317FB9CDDD023ULL, 0x66B4835D9EAFEA22ULL, 0x219B97E26FFC81BDULL,
+ 0x261E4E4C0A333A9DULL, 0x1FE2CCA76517DB90ULL, 0xD7504DFA8816EDBBULL,
+ 0xB9571FA04DC089C8ULL, 0x1DDC0325259B27DEULL, 0xCF3F4688801EB9AAULL,
+ 0xF4F5D05C10CAB243ULL, 0x38B6525C21A42B0EULL, 0x36F60E2BA4FA6800ULL,
+ 0xEB3593803173E0CEULL, 0x9C4CD6257C5A3603ULL, 0xAF0C317D32ADAA8AULL,
+ 0x258E5A80C7204C4BULL, 0x8B889D624D44885DULL, 0xF4D14597E660F855ULL,
+ 0xD4347F66EC8941C3ULL, 0xE699ED85B0DFB40DULL, 0x2472F6207C2D0484ULL,
+ 0xC2A1E7B5B459AEB5ULL, 0xAB4F6451CC1D45ECULL, 0x63767572AE3D6174ULL,
+ 0xA59E0BD101731A28ULL, 0x116D0016CB948F09ULL, 0x2CF9C8CA052F6E9FULL,
+ 0x0B090A7560A968E3ULL, 0xABEEDDB2DDE06FF1ULL, 0x58EFC10B06A2068DULL,
+ 0xC6E57A78FBD986E0ULL, 0x2EAB8CA63CE802D7ULL, 0x14A195640116F336ULL,
+ 0x7C0828DD624EC390ULL, 0xD74BBE77E6116AC7ULL, 0x804456AF10F5FB53ULL,
+ 0xEBE9EA2ADF4321C7ULL, 0x03219A39EE587A30ULL, 0x49787FEF17AF9924ULL,
+ 0xA1E9300CD8520548ULL, 0x5B45E522E4B1B4EFULL, 0xB49C3B3995091A36ULL,
+ 0xD4490AD526F14431ULL, 0x12A8F216AF9418C2ULL, 0x001F837CC7350524ULL,
+ 0x1877B51E57A764D5ULL, 0xA2853B80F17F58EEULL, 0x993E1DE72D36D310ULL,
+ 0xB3598080CE64A656ULL, 0x252F59CF0D9F04BBULL, 0xD23C8E176D113600ULL,
+ 0x1BDA0492E7E4586EULL, 0x21E0BD5026C619BFULL, 0x3B097ADAF088F94EULL,
+ 0x8D14DEDB30BE846EULL, 0xF95CFFA23AF5F6F4ULL, 0x3871700761B3F743ULL,
+ 0xCA672B91E9E4FA16ULL, 0x64C8E531BFF53B55ULL, 0x241260ED4AD1E87DULL,
+ 0x106C09B972D2E822ULL, 0x7FBA195410E5CA30ULL, 0x7884D9BC6CB569D8ULL,
+ 0x0647DFEDCD894A29ULL, 0x63573FF03E224774ULL, 0x4FC8E9560F91B123ULL,
+ 0x1DB956E450275779ULL, 0xB8D91274B9E9D4FBULL, 0xA2EBEE47E2FBFCE1ULL,
+ 0xD9F1F30CCD97FB09ULL, 0xEFED53D75FD64E6BULL, 0x2E6D02C36017F67FULL,
+ 0xA9AA4D20DB084E9BULL, 0xB64BE8D8B25396C1ULL, 0x70CB6AF7C2D5BCF0ULL,
+ 0x98F076A4F7A2322EULL, 0xBF84470805E69B5FULL, 0x94C3251F06F90CF3ULL,
+ 0x3E003E616A6591E9ULL, 0xB925A6CD0421AFF3ULL, 0x61BDD1307C66E300ULL,
+ 0xBF8D5108E27E0D48ULL, 0x240AB57A8B888B20ULL, 0xFC87614BAF287E07ULL,
+ 0xEF02CDD06FFDB432ULL, 0xA1082C0466DF6C0AULL, 0x8215E577001332C8ULL,
+ 0xD39BB9C3A48DB6CFULL, 0x2738259634305C14ULL, 0x61CF4F94C97DF93DULL,
+ 0x1B6BACA2AE4E125BULL, 0x758F450C88572E0BULL, 0x959F587D507A8359ULL,
+ 0xB063E962E045F54DULL, 0x60E8ED72C0DFF5D1ULL, 0x7B64978555326F9FULL,
+ 0xFD080D236DA814BAULL, 0x8C90FD9B083F4558ULL, 0x106F72FE81E2C590ULL,
+ 0x7976033A39F7D952ULL, 0xA4EC0132764CA04BULL, 0x733EA705FAE4FA77ULL,
+ 0xB4D8F77BC3E56167ULL, 0x9E21F4F903B33FD9ULL, 0x9D765E419FB69F6DULL,
+ 0xD30C088BA61EA5EFULL, 0x5D94337FBFAF7F5BULL, 0x1A4E4822EB4D7A59ULL,
+ 0x6FFE73E81B637FB3ULL, 0xDDF957BC36D8B9CAULL, 0x64D0E29EEA8838B3ULL,
+ 0x08DD9BDFD96B9F63ULL, 0x087E79E5A57D1D13ULL, 0xE328E230E3E2B3FBULL,
+ 0x1C2559E30F0946BEULL, 0x720BF5F26F4D2EAAULL, 0xB0774D261CC609DBULL,
+ 0x443F64EC5A371195ULL, 0x4112CF68649A260EULL, 0xD813F2FAB7F5C5CAULL,
+ 0x660D3257380841EEULL, 0x59AC2C7873F910A3ULL, 0xE846963877671A17ULL,
+ 0x93B633ABFA3469F8ULL, 0xC0C0F5A60EF4CDCFULL, 0xCAF21ECD4377B28CULL,
+ 0x57277707199B8175ULL, 0x506C11B9D90E8B1DULL, 0xD83CC2687A19255FULL,
+ 0x4A29C6465A314CD1ULL, 0xED2DF21216235097ULL, 0xB5635C95FF7296E2ULL,
+ 0x22AF003AB672E811ULL, 0x52E762596BF68235ULL, 0x9AEBA33AC6ECC6B0ULL,
+ 0x944F6DE09134DFB6ULL, 0x6C47BEC883A7DE39ULL, 0x6AD047C430A12104ULL,
+ 0xA5B1CFDBA0AB4067ULL, 0x7C45D833AFF07862ULL, 0x5092EF950A16DA0BULL,
+ 0x9338E69C052B8E7BULL, 0x455A4B4CFE30E3F5ULL, 0x6B02E63195AD0CF8ULL,
+ 0x6B17B224BAD6BF27ULL, 0xD1E0CCD25BB9C169ULL, 0xDE0C89A556B9AE70ULL,
+ 0x50065E535A213CF6ULL, 0x9C1169FA2777B874ULL, 0x78EDEFD694AF1EEDULL,
+ 0x6DC93D9526A50E68ULL, 0xEE97F453F06791EDULL, 0x32AB0EDB696703D3ULL,
+ 0x3A6853C7E70757A7ULL, 0x31865CED6120F37DULL, 0x67FEF95D92607890ULL,
+ 0x1F2B1D1F15F6DC9CULL, 0xB69E38A8965C6B65ULL, 0xAA9119FF184CCCF4ULL,
+ 0xF43C732873F24C13ULL, 0xFB4A3D794A9A80D2ULL, 0x3550C2321FD6109CULL,
+ 0x371F77E76BB8417EULL, 0x6BFA9AAE5EC05779ULL, 0xCD04F3FF001A4778ULL,
+ 0xE3273522064480CAULL, 0x9F91508BFFCFC14AULL, 0x049A7F41061A9E60ULL,
+ 0xFCB6BE43A9F2FE9BULL, 0x08DE8A1C7797DA9BULL, 0x8F9887E6078735A1ULL,
+ 0xB5B4071DBFC73A66ULL, 0x230E343DFBA08D33ULL, 0x43ED7F5A0FAE657DULL,
+ 0x3A88A0FBBCB05C63ULL, 0x21874B8B4D2DBC4FULL, 0x1BDEA12E35F6A8C9ULL,
+ 0x53C065C6C8E63528ULL, 0xE34A1D250E7A8D6BULL, 0xD6B04D3B7651DD7EULL,
+ 0x5E90277E7CB39E2DULL, 0x2C046F22062DC67DULL, 0xB10BB459132D0A26ULL,
+ 0x3FA9DDFB67E2F199ULL, 0x0E09B88E1914F7AFULL, 0x10E8B35AF3EEAB37ULL,
+ 0x9EEDECA8E272B933ULL, 0xD4C718BC4AE8AE5FULL, 0x81536D601170FC20ULL,
+ 0x91B534F885818A06ULL, 0xEC8177F83F900978ULL, 0x190E714FADA5156EULL,
+ 0xB592BF39B0364963ULL, 0x89C350C893AE7DC1ULL, 0xAC042E70F8B383F2ULL,
+ 0xB49B52E587A1EE60ULL, 0xFB152FE3FF26DA89ULL, 0x3E666E6F69AE2C15ULL,
+ 0x3B544EBE544C19F9ULL, 0xE805A1E290CF2456ULL, 0x24B33C9D7ED25117ULL,
+ 0xE74733427B72F0C1ULL, 0x0A804D18B7097475ULL, 0x57E3306D881EDB4FULL,
+ 0x4AE7D6A36EB5DBCBULL, 0x2D8D5432157064C8ULL, 0xD1E649DE1E7F268BULL,
+ 0x8A328A1CEDFE552CULL, 0x07A3AEC79624C7DAULL, 0x84547DDC3E203C94ULL,
+ 0x990A98FD5071D263ULL, 0x1A4FF12616EEFC89ULL, 0xF6F7FD1431714200ULL,
+ 0x30C05B1BA332F41CULL, 0x8D2636B81555A786ULL, 0x46C9FEB55D120902ULL,
+ 0xCCEC0A73B49C9921ULL, 0x4E9D2827355FC492ULL, 0x19EBB029435DCB0FULL,
+ 0x4659D2B743848A2CULL, 0x963EF2C96B33BE31ULL, 0x74F85198B05A2E7DULL,
+ 0x5A0F544DD2B1FB18ULL, 0x03727073C2E134B1ULL, 0xC7F6AA2DE59AEA61ULL,
+ 0x352787BAA0D7C22FULL, 0x9853EAB63B5E0B35ULL, 0xABBDCDD7ED5C0860ULL,
+ 0xCF05DAF5AC8D77B0ULL, 0x49CAD48CEBF4A71EULL, 0x7A4C10EC2158C4A6ULL,
+ 0xD9E92AA246BF719EULL, 0x13AE978D09FE5557ULL, 0x730499AF921549FFULL,
+ 0x4E4B705B92903BA4ULL, 0xFF577222C14F0A3AULL, 0x55B6344CF97AAFAEULL,
+ 0xB862225B055B6960ULL, 0xCAC09AFBDDD2CDB4ULL, 0xDAF8E9829FE96B5FULL,
+ 0xB5FDFC5D3132C498ULL, 0x310CB380DB6F7503ULL, 0xE87FBB46217A360EULL,
+ 0x2102AE466EBB1148ULL, 0xF8549E1A3AA5E00DULL, 0x07A69AFDCC42261AULL,
+ 0xC4C118BFE78FEAAEULL, 0xF9F4892ED96BD438ULL, 0x1AF3DBE25D8F45DAULL,
+ 0xF5B4B0B0D2DEEEB4ULL, 0x962ACEEFA82E1C84ULL, 0x046E3ECAAF453CE9ULL,
+ 0xF05D129681949A4CULL, 0x964781CE734B3C84ULL, 0x9C2ED44081CE5FBDULL,
+ 0x522E23F3925E319EULL, 0x177E00F9FC32F791ULL, 0x2BC60A63A6F3B3F2ULL,
+ 0x222BBFAE61725606ULL, 0x486289DDCC3D6780ULL, 0x7DC7785B8EFDFC80ULL,
+ 0x8AF38731C02BA980ULL, 0x1FAB64EA29A2DDF7ULL, 0xE4D9429322CD065AULL,
+ 0x9DA058C67844F20CULL, 0x24C0E332B70019B0ULL, 0x233003B5A6CFE6ADULL,
+ 0xD586BD01C5C217F6ULL, 0x5E5637885F29BC2BULL, 0x7EBA726D8C94094BULL,
+ 0x0A56A5F0BFE39272ULL, 0xD79476A84EE20D06ULL, 0x9E4C1269BAA4BF37ULL,
+ 0x17EFEE45B0DEE640ULL, 0x1D95B0A5FCF90BC6ULL, 0x93CBE0B699C2585DULL,
+ 0x65FA4F227A2B6D79ULL, 0xD5F9E858292504D5ULL, 0xC2B5A03F71471A6FULL,
+ 0x59300222B4561E00ULL, 0xCE2F8642CA0712DCULL, 0x7CA9723FBB2E8988ULL,
+ 0x2785338347F2BA08ULL, 0xC61BB3A141E50E8CULL, 0x150F361DAB9DEC26ULL,
+ 0x9F6A419D382595F4ULL, 0x64A53DC924FE7AC9ULL, 0x142DE49FFF7A7C3DULL,
+ 0x0C335248857FA9E7ULL, 0x0A9C32D5EAE45305ULL, 0xE6C42178C4BBB92EULL,
+ 0x71F1CE2490D20B07ULL, 0xF1BCC3D275AFE51AULL, 0xE728E8C83C334074ULL,
+ 0x96FBF83A12884624ULL, 0x81A1549FD6573DA5ULL, 0x5FA7867CAF35E149ULL,
+ 0x56986E2EF3ED091BULL, 0x917F1DD5F8886C61ULL, 0xD20D8C88C8FFE65FULL,
+ 0x31D71DCE64B2C310ULL, 0xF165B587DF898190ULL, 0xA57E6339DD2CF3A0ULL,
+ 0x1EF6E6DBB1961EC9ULL, 0x70CC73D90BC26E24ULL, 0xE21A6B35DF0C3AD7ULL,
+ 0x003A93D8B2806962ULL, 0x1C99DED33CB890A1ULL, 0xCF3145DE0ADD4289ULL,
+ 0xD0E4427A5514FB72ULL, 0x77C621CC9FB3A483ULL, 0x67A34DAC4356550BULL,
+ 0xF8D626AAAF278509ULL
+ }};
+
+ // polyglot_key() returns the PolyGlot hash key of the given position
+ Key polyglot_key(const Position& pos) {
+
+ Key key = 0;
+ Bitboard b = pos.pieces();
+
+ while (b)
+ {
+ Square s = pop_lsb(&b);
+ Piece pc = pos.piece_on(s);
+
+ // PolyGlot pieces are: BP = 0, WP = 1, BN = 2, ... BK = 10, WK = 11
+ key ^= PG.Zobrist.psq[2 * (type_of(pc) - 1) + (color_of(pc) == WHITE)][s];
+ }
+
+ b = pos.can_castle(ANY_CASTLING);
+
+ while (b)
+ key ^= PG.Zobrist.castling[pop_lsb(&b)];
+
+ if (pos.ep_square() != SQ_NONE)
+ key ^= PG.Zobrist.enpassant[file_of(pos.ep_square())];
+
+ if (pos.side_to_move() == WHITE)
+ key ^= PG.Zobrist.turn;
+
+ return key;
+ }
+
+} // namespace
+
+PolyglotBook::PolyglotBook() : rng(now() % 10000) {}
+
+PolyglotBook::~PolyglotBook() { if (is_open()) close(); }
+
+
+/// operator>>() reads sizeof(T) chars from the file's binary byte stream and
+/// converts them into a number of type T. A Polyglot book stores numbers in
+/// big-endian format.
+
+template PolyglotBook& PolyglotBook::operator>>(T& n) {
+
+ n = 0;
+ for (size_t i = 0; i < sizeof(T); ++i)
+ n = T((n << 8) + ifstream::get());
+
+ return *this;
+}
+
+template<> PolyglotBook& PolyglotBook::operator>>(Entry& e) {
+ return *this >> e.key >> e.move >> e.count >> e.learn;
+}
+
+
+/// open() tries to open a book file with the given name after closing any
+/// existing one.
+
+bool PolyglotBook::open(const char* fName) {
+
+ if (is_open()) // Cannot close an already closed file
+ close();
+
+ ifstream::open(fName, ifstream::in | ifstream::binary);
+
+ fileName = is_open() ? fName : "";
+ ifstream::clear(); // Reset any error flag to allow a retry ifstream::open()
+ return !fileName.empty();
+}
+
+
+/// probe() tries to find a book move for the given position. If no move is
+/// found, it returns MOVE_NONE. If pickBest is true, then it always returns
+/// the highest-rated move, otherwise it randomly chooses one based on the
+/// move score.
+
+Move PolyglotBook::probe(const Position& pos, const string& fName, bool pickBest) {
+
+ if (fileName != fName && !open(fName.c_str()))
+ return MOVE_NONE;
+
+ Entry e;
+ uint16_t best = 0;
+ unsigned sum = 0;
+ Move move = MOVE_NONE;
+ Key key = polyglot_key(pos);
+
+ seekg(find_first(key) * sizeof(Entry), ios_base::beg);
+
+ while (*this >> e, e.key == key && good())
+ {
+ best = max(best, e.count);
+ sum += e.count;
+
+ // Choose book move according to its score. If a move has a very high
+ // score it has a higher probability of being choosen than a move with
+ // a lower score. Note that first entry is always chosen.
+ if ( (!pickBest && sum && rng.rand() % sum < e.count)
+ || (pickBest && e.count == best))
+ move = Move(e.move);
+ }
+
+ if (!move)
+ return MOVE_NONE;
+
+ // A PolyGlot book move is encoded as follows:
+ //
+ // bit 0- 5: destination square (from 0 to 63)
+ // bit 6-11: origin square (from 0 to 63)
+ // bit 12-14: promotion piece (from KNIGHT == 1 to QUEEN == 4)
+ //
+ // Castling moves follow the "king captures rook" representation. If a book
+ // move is a promotion, we have to convert it to our representation and in
+ // all other cases, we can directly compare with a Move after having masked
+ // out the special Move flags (bit 14-15) that are not supported by PolyGlot.
+ int pt = (move >> 12) & 7;
+ if (pt)
+ move = make(from_sq(move), to_sq(move), PieceType(pt + 1));
+
+ // Add 'special move' flags and verify it is legal
+ for (const auto& m : MoveList(pos))
+ if (move == (Move(m) ^ Move(type_of(m))))
+ return m;
+
+ return MOVE_NONE;
+}
+
+
+/// find_first() takes a book key as input, and does a binary search through
+/// the book file for the given key. Returns the index of the leftmost book
+/// entry with the same key as the input.
+
+size_t PolyglotBook::find_first(Key key) {
+
+ seekg(0, ios::end); // Move pointer to end, so tellg() gets file's size
+
+ size_t low = 0, mid, high = (size_t)tellg() / sizeof(Entry) - 1;
+ Entry e;
+
+ assert(low <= high);
+
+ while (low < high && good())
+ {
+ mid = (low + high) / 2;
+
+ assert(mid >= low && mid < high);
+
+ seekg(mid * sizeof(Entry), ios_base::beg);
+ *this >> e;
+
+ if (key <= e.key)
+ high = mid;
+ else
+ low = mid + 1;
+ }
+
+ assert(low == high);
+
+ return low;
+}
diff --git a/Engines/Linux32/mcbrain/src/book.h b/Engines/Linux32/mcbrain/src/book.h
new file mode 100644
index 0000000..c88920f
--- /dev/null
+++ b/Engines/Linux32/mcbrain/src/book.h
@@ -0,0 +1,53 @@
+/*
+ McBrain, a UCI chess playing engine derived from Stockfish and Glaurung 2.1
+ Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
+ Copyright (C) 2008-2015 Marco Costalba, Joona Kiiski, Tord Romstad (Stockfish Authors)
+ Copyright (C) 2015-2016 Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad (Stockfish Authors)
+ Copyright (C) 2017-2018 Michael Byrne, Marco Costalba, Joona Kiiski, Gary Linscott, Tord Romstad (McBrain Authors)
+
+ McBrain is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ McBrain is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+ */
+
+/*
+ The code in this file is based on the opening book code in PolyGlot
+ by Fabien Letouzey. PolyGlot is available under the GNU General
+ Public License, and can be downloaded from http://wbec-ridderkerk.nl
+ */
+
+#ifndef BOOK_H_INCLUDED
+#define BOOK_H_INCLUDED
+
+#include
+#include
+
+#include "misc.h"
+#include "position.h"
+
+class PolyglotBook : private std::ifstream {
+public:
+ PolyglotBook();
+ ~PolyglotBook();
+ Move probe(const Position& pos, const std::string& fName, bool pickBest);
+
+private:
+ template PolyglotBook& operator>>(T& n);
+
+ bool open(const char* fName);
+ size_t find_first(Key key);
+
+ PRNG rng;
+ std::string fileName;
+};
+
+#endif // #ifndef BOOK_H_INCLUDED
diff --git a/Engines/Linux32/mcbrain/src/endgame.cpp b/Engines/Linux32/mcbrain/src/endgame.cpp
index 86210af..3455e79 100644
--- a/Engines/Linux32/mcbrain/src/endgame.cpp
+++ b/Engines/Linux32/mcbrain/src/endgame.cpp
@@ -87,30 +87,6 @@ namespace {
} // namespace
-/// Endgames members definitions
-
-Endgames::Endgames() {
-
- add("KPK");
- add("KNNK");
- add("KBNK");
- add("KRKP");
- add("KRKB");
- add("KRKN");
- add("KQKP");
- add("KQKR");
-
- add("KNPK");
- add("KNPKB");
- add("KRPKR");
- add("KRPKB");
- add("KBPKB");
- add("KBPKN");
- add("KBPPKB");
- add("KRPPKRP");
-}
-
-
/// Mate with KX vs K. This function is used to evaluate positions with
/// king and plenty of material vs a lone king. It simply gives the
/// attacking side a bonus for driving the defending king towards the edge
@@ -144,6 +120,28 @@ Value Endgame::operator()(const Position& pos) const {
}
+/// Mate with KQX vs KX. This is similar to KX vs K.
+template<>
+Value Endgame::operator()(const Position& pos) const {
+
+ assert(pos.non_pawn_material(strongSide) > QueenValueMg + RookValueMg);
+ assert(pos.non_pawn_material(weakSide) <= RookValueMg);
+
+ Square winnerKSq = pos.square(strongSide);
+ Square loserKSq = pos.square(weakSide);
+
+ Value result = VALUE_KNOWN_WIN
+ + pos.non_pawn_material(strongSide)
+ - pos.non_pawn_material(weakSide)
+ + PushClose[distance(winnerKSq, loserKSq)]
+ + PushToCorners[loserKSq];
+
+ result = std::min(result, VALUE_MATE_IN_MAX_PLY - 1);
+
+ return strongSide == pos.side_to_move() ? result : -result;
+}
+
+
/// Mate with KBN vs K. This is similar to KX vs K, but we have to drive the
/// defending king towards a corner square of the right color.
template<>
@@ -215,7 +213,7 @@ Value Endgame::operator()(const Position& pos) const {
Value result;
// If the stronger side's king is in front of the pawn, it's a win
- if (wksq < psq && file_of(wksq) == file_of(psq))
+ if (forward_file_bb(WHITE, wksq) & psq)
result = RookValueEg - distance(wksq, psq);
// If the weaker side's king is too far from the pawn and the rook,
diff --git a/Engines/Linux32/mcbrain/src/endgame.h b/Engines/Linux32/mcbrain/src/endgame.h
index eec1490..58338cc 100644
--- a/Engines/Linux32/mcbrain/src/endgame.h
+++ b/Engines/Linux32/mcbrain/src/endgame.h
@@ -39,6 +39,7 @@ enum EndgameCode {
EVALUATION_FUNCTIONS,
KNNK, // KNN vs K
KXK, // Generic "mate lone king" eval
+ KQXKX, // Big material advantage eval
KBNK, // KBN vs K
KPK, // KP vs K
KRKP, // KR vs KP
@@ -65,6 +66,7 @@ enum EndgameCode {
/// Endgame functions can be of two types depending on whether they return a
/// Value or a ScaleFactor.
+
template using
eg_type = typename std::conditional<(E < SCALING_FUNCTIONS), Value, ScaleFactor>::type;
@@ -104,21 +106,40 @@ class Endgames {
return std::get::value>(maps);
}
- template, typename P = Ptr>
+ template>
void add(const std::string& code) {
StateInfo st;
- map()[Position().set(code, WHITE, &st).material_key()] = P(new Endgame(WHITE));
- map()[Position().set(code, BLACK, &st).material_key()] = P(new Endgame(BLACK));
+ map()[Position().set(code, WHITE, &st).material_key()] = Ptr(new Endgame(WHITE));
+ map()[Position().set(code, BLACK, &st).material_key()] = Ptr(new Endgame(BLACK));
}
std::pair