Skip to content

Commit

Permalink
Version R2.05d
Browse files Browse the repository at this point in the history
  • Loading branch information
lukasmonk committed Jan 24, 2023
1 parent 26f6e8b commit bc314d3
Show file tree
Hide file tree
Showing 53 changed files with 266 additions and 253 deletions.
2 changes: 1 addition & 1 deletion Resources/IntFiles/afinidades.dic

Large diffs are not rendered by default.

Binary file modified Resources/Locale/es/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file modified Resources/Locale/fr/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file modified Resources/Locale/gr/LC_MESSAGES/lucaschess.mo
Binary file not shown.
226 changes: 110 additions & 116 deletions Resources/Locale/messages.pot

Large diffs are not rendered by default.

Binary file modified Resources/Locale/zh/LC_MESSAGES/lucaschess.mo
Binary file not shown.
Binary file removed bin/Code.zip
Binary file not shown.
4 changes: 2 additions & 2 deletions bin/Code/Analysis/WindowAnalysisParam.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def analysis_parameters(parent, configuration, siModoAmpliado, siTodosMotores=Fa
li_gen.append(SEPARADOR)

liJ = [(_("White"), "WHITE"), (_("Black"), "BLACK"), (_("White & Black"), "BOTH")]
config = FormLayout.Combobox(_("Analyze only color"), liJ)
config = FormLayout.Combobox(_("Analyze color"), liJ)
if alm.white and alm.black:
color = "BOTH"
elif alm.black:
Expand Down Expand Up @@ -416,7 +416,7 @@ def massive_analysis_parameters(parent, configuration, siVariosSeleccionados, si
li_gen.append(SEPARADOR)

liJ = [(_("White"), "WHITE"), (_("Black"), "BLACK"), (_("White & Black"), "BOTH")]
config = FormLayout.Combobox(_("Analyze only color"), liJ)
config = FormLayout.Combobox(_("Analyze color"), liJ)
if alm.white and alm.black:
color = "BOTH"
elif alm.black:
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Competitions/ManagerMicElo.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def base_inicio(self, engine_rival, minutos, seconds, human_side=None):
if self.engine_rival.book:
cbook = self.engine_rival.book
else:
engine_rodent = Code.configuration.buscaRival("rodentII")
engine_rodent = Code.configuration.buscaRival("rodentii")
path_rodent = os.path.join(os.path.dirname(engine_rodent.path_exe), "rodent.bin")
cbook = random.choice([Code.tbook, path_rodent])

Expand Down
6 changes: 0 additions & 6 deletions bin/Code/Databases/WDB_Players.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,6 @@ def __init__(self, side, rutina):
ply4 = Controles.PB(self, "^4", self.run_p4, plano=False).anchoFijo(ancho)
ply5 = Controles.PB(self, "^5", self.run_p5, plano=False).anchoFijo(ancho)

ply1.setToolTip(_("%d ply") % 1)
ply2.setToolTip(_("%d ply") % 2)
ply3.setToolTip(_("%d ply") % 3)
ply4.setToolTip(_("%d ply") % 4)
ply5.setToolTip(_("%d ply") % 5)

self.sbply = Controles.SB(self, 0, 0, 100)
self.sbply.capture_changes(self.run_p)
lbply = Controles.LB(self, _("Half-moves"))
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Endings/WEndingsGTB.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def nuevo(self):
if position is not None:
fen = position.fen()
mt = self.t4.dtm(fen)
if mt in (None, 0):
if mt is None:
QTUtil2.message_error(self, _("Invalid, this position is not evaluated by Gaviota Tablebases"))
return
if mt < 0:
Expand Down
3 changes: 3 additions & 0 deletions bin/Code/Engines/EngineManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,9 @@ def check_engine(self):
self.engine.siDebug = True
self.engine.nomDebug = self.confMotor.nomDebug

if self.confMotor.emulate_movetime:
self.engine.emulate_movetime = True

if self.dispatching:
rutina, who_dispatch = self.dispatching
self.engine.set_gui_dispatch(rutina, who_dispatch)
Expand Down
22 changes: 15 additions & 7 deletions bin/Code/Engines/EngineRun.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def __init__(self, name, exe, liOpcionesUCI=None, num_multipv=0, priority=None,
self.whoDispatch = name
self.uci_ok = False

self.emulate_movetime = False

self.uci_lines = []

if not os.path.isfile(exe):
Expand Down Expand Up @@ -363,16 +365,22 @@ def work_infinite(self, busca, msmax_time):

def seek_bestmove(self, max_time, max_depth, is_savelines):
env = "go"
ms_time = None
if max_depth:
env += " depth %d" % max_depth
elif max_time:
env += " movetime %d" % max_time

ms_time = 10000
if max_time:
ms_time = max_time if max_depth else max_time + 5000
elif max_depth:
ms_time = 10000000000 # non stop
if self.emulate_movetime:
env += " infinite"
ms_time = max_time
else:
env += " movetime %d" % max_time

if ms_time is None:
ms_time = 10000
if max_time:
ms_time = max_time if max_depth else max_time + 5000
elif max_depth:
ms_time = 10000000000 # non stop

self.reset()
if is_savelines:
Expand Down
1 change: 1 addition & 0 deletions bin/Code/Engines/Engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def __init__(self, key="", autor="", version="", url="", path_exe="", args=None)
self.id_name = key
self.id_author = autor
self.book = None
self.emulate_movetime = False

self.menu = key
self.type = ENG_INTERNAL
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Engines/SelectEngines.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def redo_external_engines(self):
self.liMotoresClavePV = self.configuration.comboMotoresMultiPV10()

def gen_engines_rodent(self):
cmbase = self.configuration.buscaRival("rodentII")
cmbase = self.configuration.buscaRival("rodentii")
path_personalities = os.path.join(os.path.dirname(cmbase.path_exe), "personalities")
path_ini = os.path.join(path_personalities, "personalities.ini")
dict_ini = Util.ini2dic(path_ini)
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Kibitzers/Kibitzers.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def nuevo_index(self):
if kib.tipo == KIB_INDEXES:
return
kib = Kibitzer()
eng = Code.configuration.buscaRival("rodentII")
eng = Code.configuration.buscaRival("rodentii")
kib.restore(eng.save())
kib.pon_huella(self.lista)
kib.name = _("Indexes") + " - RodentII"
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Kibitzers/WKibEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(self, cpu):
Iconos.Kibitzer_Clipboard(),
self.portapapelesJugSelected,
),
(_("Analyze only color"), Iconos.Kibitzer_Side(), self.color),
(_("Analyze color"), Iconos.Kibitzer_Side(), self.color),
(_("Show/hide board"), Iconos.Kibitzer_Board(), self.config_board),
(_("Manual position"), Iconos.Kibitzer_Voyager(), self.set_position),
("%s: %s" % (_("Enable"), _("window on top")), Iconos.Kibitzer_Up(), self.windowTop),
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Kibitzers/WKibIndex.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, cpu):
(_("Continue"), Iconos.Kibitzer_Play(), self.play),
(_("Pause"), Iconos.Kibitzer_Pause(), self.pause),
(_("Takeback"), Iconos.Kibitzer_Back(), self.takeback),
(_("Analyze only color"), Iconos.Kibitzer_Side(), self.color),
(_("Analyze color"), Iconos.Kibitzer_Side(), self.color),
(_("Show/hide board"), Iconos.Kibitzer_Board(), self.config_board),
(_("Manual position"), Iconos.Voyager(), self.set_position),
("%s: %s" % (_("Enable"), _("window on top")), Iconos.Kibitzer_Up(), self.windowTop),
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Kibitzers/WKibLinea.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def __init__(self, cpu):
(_("Quit"), Iconos.Kibitzer_Close(), self.terminar),
(_("Continue"), Iconos.Kibitzer_Play(), self.play),
(_("Pause"), Iconos.Kibitzer_Pause(), self.pause),
(_("Analyze only color"), Iconos.Kibitzer_Side(), self.color),
(_("Analyze color"), Iconos.Kibitzer_Side(), self.color),
(_("Change window position"), Iconos.ResizeBoard(), self.mover),
(_("Options"), Iconos.Opciones(), self.changeOptions),
)
Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Kibitzers/WindowKibitzers.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def nuevo_engine(self):

# Indexes only with Rodent II
if tipo == "I":
engine = "rodentII"
engine = "rodentii"
if not name: # para que no repita rodent II
name = _("Indexes") + " - RodentII"

Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Leagues/Leagues.py
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ def num_divisions(self):

def create_from(self, season_previous):
num_divisions = self.num_divisions()
li_panels = season_previous.gen_panels_classification()
li_panels, dic_xid_order = season_previous.gen_panels_classification()

li_xid_divisions = [set() for x in range(num_divisions)]
dic_elo_todos = {}
Expand Down
62 changes: 33 additions & 29 deletions bin/Code/Openings/OpeningLines.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,6 +877,9 @@ def import_pgn(self, owner, gamebase, path_pgn, max_depth, with_variations, with
for n, (nbytes, game) in enumerate(Game.read_games(path_pgn)):
dlTmp.pon(nbytes)

if dlTmp.is_canceled():
break

li_pv = game.all_pv("", with_variations)
if not game.siFenInicial():
continue
Expand Down Expand Up @@ -1083,7 +1086,7 @@ def hazPV(lipv_ant):
pv_ant = " ".join(lipv_ant) if n_ant else ""
li_children = db_stat.children(pv_ant, False)

if len(li_children) == 0 or len(lipv_ant) > depth:
if len(li_children) == 0 or len(lipv_ant) >= depth:
game = Game.Game()
game.leerLIPV(lipv_ant)
if len(game) > len_gamebase and len(game) >= min_moves:
Expand Down Expand Up @@ -1185,34 +1188,35 @@ def exportarPGN(self, ws, result):

def transpositions(self):
self.save_history(_("Complete with transpositions"))
lilipv = [FasterCode.xpv_pv(xpv).split(" ") for xpv in self.li_xpv]
p = Position.Position()
dir_post = collections.defaultdict(set)
dir_prev = collections.defaultdict(set)
for lipv in lilipv:
FasterCode.set_init_fen()
s0 = set()
for pos, a1h8 in enumerate(lipv):
FasterCode.make_move(a1h8)
fen = FasterCode.get_fen()
fenm2 = FasterCode.fen_fenm2(fen)
if not fenm2.endswith("-"): # enpassant imposibles
p.read_fen(fen)
fenm2 = p.fenm2()
if fenm2 in s0:
break
s0.add(fenm2)
dir_prev[fenm2].add(" ".join(lipv[:pos + 1]))
if pos < len(lipv) - 1:
dir_post[fenm2].add(" ".join(lipv[pos + 1:]))
st_pv = set()
for fenm2, li_pv_prev in dir_prev.items():
for pv_prev in li_pv_prev:
for pv_post in dir_post[fenm2]:
a1h8 = pv_prev + " " + pv_post
st_pv.add(a1h8)
self.li_xpv = [FasterCode.pv_xpv(pv) for pv in st_pv]
self.clean()
for una in range(2): # dos pasadas
lilipv = [FasterCode.xpv_pv(xpv).split(" ") for xpv in self.li_xpv]
p = Position.Position()
dir_post = collections.defaultdict(set)
dir_prev = collections.defaultdict(set)
for lipv in lilipv:
FasterCode.set_init_fen()
s0 = set()
for pos, a1h8 in enumerate(lipv):
FasterCode.make_move(a1h8)
fen = FasterCode.get_fen()
fenm2 = FasterCode.fen_fenm2(fen)
if not fenm2.endswith("-"): # enpassant imposibles
p.read_fen(fen)
fenm2 = p.fenm2()
if fenm2 in s0:
break
s0.add(fenm2)
dir_prev[fenm2].add(" ".join(lipv[:pos + 1]))
if pos < len(lipv) - 1:
dir_post[fenm2].add(" ".join(lipv[pos + 1:]))
st_pv = set()
for fenm2, li_pv_prev in dir_prev.items():
for pv_prev in li_pv_prev:
for pv_post in dir_post[fenm2]:
a1h8 = pv_prev + " " + pv_post
st_pv.add(a1h8)
self.li_xpv = [FasterCode.pv_xpv(pv) for pv in st_pv]
self.clean()

def clean(self):
li_new = []
Expand Down
17 changes: 9 additions & 8 deletions bin/Code/Openings/WindowOpeningLine.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def ta_massive(self):
form.separador()

liJ = [(_("White"), "WHITE"), (_("Black"), "BLACK"), (_("White & Black"), "BOTH")]
form.combobox(_("Analyze only color"), liJ, dicVar.get("COLOR", "BOTH"))
form.combobox(_("Analyze color"), liJ, dicVar.get("COLOR", "BOTH"))
form.separador()

form.combobox(
Expand Down Expand Up @@ -1102,23 +1102,24 @@ def remove_worst(self):
dic = self.dbop.dicRepeFen(si_white)
mensaje = _("Move") + " %d/" + str(len(dic))
xmanager = self.procesador.creaManagerMotor(self.configuration.engine_tutor(), ms, 0, siMultiPV=False)
xmanager.set_multipv(20)

st_borrar = set()

ok = True

um.final()

tmpBP = QTUtil2.BarraProgreso(self, _("Remove worst lines"), "", len(dic), width=460)
tmpBP.mostrar()
tmp_bp = QTUtil2.BarraProgreso(self, _("Remove worst lines"), "", len(dic), width=460)
tmp_bp.mostrar()

for n, fen in enumerate(dic, 1):
if tmpBP.is_canceled():
if tmp_bp.is_canceled():
ok = False
break

tmpBP.inc()
tmpBP.mensaje(mensaje % n)
tmp_bp.inc()
tmp_bp.mensaje(mensaje % n)

dic_a1h8 = dic[fen]
st_a1h8 = set(dic_a1h8.keys())
Expand All @@ -1139,14 +1140,14 @@ def remove_worst(self):
mrm = xmanager.analiza(fen)
for a1h8 in dic_a1h8:
rm, pos = mrm.buscaRM(a1h8)
li.append((a1h8, pos))
li.append((a1h8, pos if pos>= 0 else 999))
li.sort(key=lambda x: x[1])

for a1h8, pos in li[1:]:
for num_linea in dic_a1h8[a1h8]:
st_borrar.add(num_linea)

tmpBP.cerrar()
tmp_bp.cerrar()

xmanager.terminar()

Expand Down
2 changes: 1 addition & 1 deletion bin/Code/Polyglots/Books.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def alMenosUno(self):
ok_gm = False
ok_rd = False

engine_rodent = Code.configuration.buscaRival("rodentII")
engine_rodent = Code.configuration.buscaRival("rodentii")
path_rodent = os.path.join(os.path.dirname(engine_rodent.path_exe), "rodent.bin")

for book in self.lista:
Expand Down
4 changes: 2 additions & 2 deletions bin/Code/QT/QTVarios.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def x(tit, tr, icono):
x("MoverJugar", _("Play"), Iconos.MoverJugar())
li_acciones.append(None)
if siTiempo:
x("MoverTiempo", _("Timed movement") + "\n%s" % ("Right click to change the interval"), Iconos.MoverTiempo())
x("MoverTiempo", _("Timed movement") + "\n%s" % _("Right click to change the interval"), Iconos.MoverTiempo())
li_acciones.append(None)
if must_save:
x("MoverGrabar", _("Save"), Iconos.MoverGrabar())
Expand Down Expand Up @@ -884,7 +884,7 @@ def __init__(
def change_interval(owner, configuration):
form = FormLayout.FormLayout(owner, _("Replay game"), Iconos.Pelicula_Repetir(), anchoMinimo=250)
form.separador()
form.float(_("Duration of interval (secs)"), configuration.x_interval_replay / 1000)
form.float(_("Number of seconds between moves"), configuration.x_interval_replay / 1000)
form.separador()
form.checkbox(_("Beep after each move"), configuration.x_beep_replay)
form.separador()
Expand Down
3 changes: 3 additions & 0 deletions bin/Code/Tactics/ManagerTactics.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ def reiniciar(self):
self.main_window.set_activate_tutor(False)
self.main_window.activaJuego(True, False, siAyudas=False)
self.main_window.remove_hints(True, True)
self.informacionActivable = True
self.set_dispatcher(self.player_has_moved)
self.set_position(self.game.last_position)
self.show_side_indicator(True)
Expand Down Expand Up @@ -257,6 +258,8 @@ def end_line(self):
self.set_toolbar("end")
if self.configuration.x_director_icon is not None:
self.board.dbvisual_set_show_always(True)
self.game = self.game_obj.copia()
self.pgnRefresh(self.game.last_position.is_white)

return True

Expand Down
2 changes: 1 addition & 1 deletion bin/Code/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def relative_root(path):


BASE_VERSION = "B" # Para el control de updates que necesitan reinstalar entero
VERSION = "R 2.05c1"
VERSION = "R 2.05d"
DEBUG = False
DEBUG_ENGINES = False

Expand Down
2 changes: 1 addition & 1 deletion bin/LucasR.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import warnings

warnings.simplefilter("ignore", UserWarning)
warnings.simplefilter("ignore") #, UserWarning)

n_args = len(sys.argv)
if n_args == 1:
Expand Down
Binary file modified bin/OS/linux/DigitalBoards/libcer.so
Binary file not shown.
Binary file modified bin/OS/linux/DigitalBoards/libcit.so
Binary file not shown.
Binary file modified bin/OS/linux/DigitalBoards/libdgt.so
Binary file not shown.
Binary file modified bin/OS/linux/DigitalBoards/libmcl.so
Binary file not shown.
Binary file modified bin/OS/linux/DigitalBoards/libnut.so
Binary file not shown.
Binary file modified bin/OS/linux/DigitalBoards/libosa.so
Binary file not shown.
Binary file modified bin/OS/linux/DigitalBoards/libucb.so
Binary file not shown.
2 changes: 1 addition & 1 deletion bin/OS/linux/DigitalBoards/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2
4
Loading

0 comments on commit bc314d3

Please sign in to comment.