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

Commit

Permalink
Version 11.12a
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmonk committed Oct 11, 2018
1 parent 69ead13 commit bea69d1
Show file tree
Hide file tree
Showing 326 changed files with 33,611 additions and 36,707 deletions.
2 changes: 1 addition & 1 deletion Code/Analisis.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Code/AnalisisIndexes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from Code import VarGen
from Code import Partida
Expand Down
2 changes: 1 addition & 1 deletion Code/AperturasStd.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from operator import attrgetter

Expand Down
2 changes: 1 addition & 1 deletion Code/CajonDesastre.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import shutil
import sqlite3

import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from Code import BaseConfig
from Code import Util
Expand Down
11 changes: 7 additions & 4 deletions Code/Configuracion.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions Code/Constantes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion Code/ControlPGN.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion Code/ControlPosicion.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from Code import TrListas

Expand Down
2 changes: 1 addition & 1 deletion Code/DBgames.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time
import random

import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from Code import ControlPosicion
from Code import Partida
Expand Down
2 changes: 1 addition & 1 deletion Code/DBgamesFEN.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import time
import random

import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from Code import Partida
from Code import Util
Expand Down
8 changes: 6 additions & 2 deletions Code/EnginesBunch.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -76,6 +77,7 @@ def relaciones(dicRivales):
d[s] = n
return d


def filtra(dicRivales):
d = relaciones(dicRivales)
stkeys = set()
Expand All @@ -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()
Expand All @@ -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)
Expand Down Expand Up @@ -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]
return dlista[clave]
4 changes: 2 additions & 2 deletions Code/EnginesLinux32.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions Code/EnginesLinux64.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
6 changes: 3 additions & 3 deletions Code/EnginesWindows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
9 changes: 9 additions & 0 deletions Code/Entrenamientos.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)

Expand Down
21 changes: 20 additions & 1 deletion Code/Everest.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Code/GM.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion Code/Gestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import random
import time

import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from Code import Analisis
from Code import AnalisisIndexes
Expand Down
2 changes: 1 addition & 1 deletion Code/Gestor60.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import random
import time

import LCEngineV1 as LCEngine
import LCEngine2 as LCEngine

from Code import ControlPosicion
from Code import Gestor
Expand Down
Loading

0 comments on commit bea69d1

Please sign in to comment.