lukasmonk / lucaschess Goto Github PK
View Code? Open in Web Editor NEWChess GUI
Home Page: http://lucaschess.pythonanywhere.com/
License: GNU General Public License v2.0
Chess GUI
Home Page: http://lucaschess.pythonanywhere.com/
License: GNU General Public License v2.0
To be able to run Lucas Chess from sources I had to copy PantallaDatabase.pyo PantallaManualSave.pyo from binary distribution.
Mac support would be helpful!
Play
-> Play against an engine of your choice
. Select Monkey as an opponent. Start game, then Config
-> Change opponent
. Choose Donkey, click Accept
.
Traceback (most recent call last):
File ".\Code\QT\WBase.py", line 259, in procesarAccion
self.gestor.procesarAccion(self.sender().clave)
File ".\Code\GestorEntMaq.py", line 324, in procesarAccion
self.cambioRival()
File ".\Code\GestorEntMaq.py", line 1030, in cambioRival
Util.guardaDIC(dic, self.configuracion.ficheroEntMaquina)
File ".\Code\Util.py", line 42, in guardaDIC
q.write(base64.encodestring(cPickle.dumps(dic)))
File "copy_reg.pyo", line 71, in _reduce_ex
TypeError: the sip.wrapper type cannot be instantiated or sub-classed
. . even when I have set the opening to 'undetermined'. The computer always opens with nf3 or, as black against e3, always plays Nf6. The problem occurs with the Deep Tonga engine and one other engine that I tried.
Freeze when tutor is enable and is stockfish while playing a game.
OS: debian stretch
output of log:
Version 9.04
Traceback (most recent call last):
File "/lucaschess-master/Code/QT/TabElementos.py", line 214, in mouseReleaseEvent
self.tablero.intentaMover(self, event.scenePos(), event.button())
File "/lucaschess-master/Code/QT/Tablero.py", line 1180, in intentaMover
self.mensajero(desde, hasta)
File "/lucaschess-master/Code/GestorEntMaq.py", line 866, in mueveHumano
self.siguienteJugada()
File "/lucaschess-master/Code/GestorEntMaq.py", line 581, in siguienteJugada
resp = self.mueveRival(self.rmRival)
File "/lucaschess-master/Code/GestorEntMaq.py", line 914, in mueveRival
desde = respMotor.desde
AttributeError: 'NoneType' object has no attribute 'desde'
I don't think it is usable on linux.
Though it can be used in winE.
But generic support would be great.
Thanks.
Hi Luca! Could you please update the RodentII chess engine (http://www.pkoziol.cal24.pl/rodent/download.htm) to the latest 0.9.64 with the next release of LucaChess? Thank you.
I installed by accident portable and windows version and saw that portable version contains much more training material that installation. Can you fix it or explain how to fix installed version?
When I analyse a game the graphics window always opens with white at the bottom. So when I play black I always need to flip the board before playing through the game.
This is obviously not a big deal, but it would be nice if it opened up with the players colour at the bottom.
Sadly, the native Linux version runs much worse on my system (Mint 18 Cinnamon) than does the Windows version under Wine (on the same system).
For, on the native version:
Dear Lucas Chess Team,
First, I want to express my gratitude for your valuable contribution with Lucas Chess. This software is powerful and highly useful for many chess players.
In this opportunity, I’m writing to suggest an idea of improvement for future versions of your tool.
Due to the increasing number of computers with High DPI screens (i.e. 4k), it is necessary to support the automatic screen scale factor in Qt. The following link provides information to support these characteristics: http://doc.qt.io/qt-5/highdpi.html. Please find attached a screen capture to illustrate the issue on a 4k display.
Thanks for your attention, and best regards.
Interception-blocade.fns:19 has a solution of 1.Re8+ Bxe8 2.Qg8#, but Lucas Chess rejects this in the Turn On the Lights exercise..
This appears to be a two-part issue, first is that the .fns file doesn't have the alt listed, and second is that it isn't recognized by that activity even if the alt is present.
Hi,
I have seen that when you save all the matches of a tournament to a PGN there is no blank line between games.
I don't know if I understand right the PGN spec:
8.2.1: Movetext line justification
...
As with the tag pair section,
a single empty line follows the last line of data to conclude the movetext
section.
...
I guess that including a '\n' in the file Code\Torneo.py
could do it:
def pgn(self, torneo):
...
return cabecera + "\n" + base + " %s\n\n" % rs
Br
Play
-> Play against an engine of your choice
. Select Monkey as an opponent. Make several moves. Utilities
-> Play current position
. Select Monkey too, press Accept.
Traceback (most recent call last):
File "lucas.py", line 58, in <module>
File ".\Code\Init.py", line 27, in init
resp = Gui.lanzaGUI(mainProcesador)
File "Code\QT\Gui.pyo", line 116, in lanzaGUI
File "Code\Procesador.pyo", line 160, in iniciarGUI
File "Code\Procesador.pyo", line 808, in juegaExterno
File "Code\GestorSolo.pyo", line 178, in inicio
���
File "Code\GestorSolo.pyo", line 860, in cambioRival
File "Code\Configuracion.pyo", line 791, in escVariables
File ".\Code\Util.py", line 894, in __setitem__
dato = base64.encodestring(cPickle.dumps(obj))
File "copy_reg.pyo", line 71, in _reduce_ex
TypeError: the sip.wrapper type cannot be instantiated or sub-classed
Rodent 1.x (1.6, 1.7) have a broken output in UCI combo options. See this line break before default GM?
Because of this, the parameter isn't shown in the LC's external engine config GUI.
Proposal fix (in EngineThread.py):
def xstdout_thread(self, stdout, lock):
try:
while self.working:
line = stdout.readline()
if not line:
break
lock.acquire()
if line.startswith(' default'): # fix for buggy rodent 1.x
self.liBuffer[-1] += line
else:
self.liBuffer.append(line)
lock.release()
except:
pass
finally:
stdout.close()
I don't know if you OK to do it just for one engine (well, maybe two).
As the title said. You don't close animals/vehicles album engines nor after a game neither between them. Number of Irinas grows.
BTW I see that sometimes you start stockfish together with Irina. I wonder, why do you do that?
Hi,
(Sorry English isn't my native language.)
I'm trying to run lucas chess, but i'm getting error:
seb321@seb321-K54HR:~/lucaschess$ ./Lucas.py
Traceback (most recent call last):
File "./Lucas.py", line 41, in
import Code.Init
File "/home/seb321/lucaschess/Code/Init.py", line 12, in
import Code.Procesador as Procesador
File "/home/seb321/lucaschess/Code/Procesador.py", line 22, in
import Code.GestorSolo as GestorSolo
File "/home/seb321/lucaschess/Code/GestorSolo.py", line 12, in
import Code.Voice as Voice
File "/home/seb321/lucaschess/Code/Voice.py", line 10, in
from pocketsphinx import Decoder
File "sphinxbase.pxd", line 150, in init pocketsphinx (pocketsphinx.c:7935)
ValueError: PyCapsule_GetPointer called with invalid PyCapsule object
Ubuntu 14.04 64 bit
What i'm doing wrong?
Help!
I'm not sure if this is specific to openings training, but Kibitzers generally don't work in this mode - I had some luck using a kibitzer based on Stockfish, but not with others, e.g Komodo 32bit. Once I add first kibitzer and it works (stockfish), it opens a kibitzer window, but then when I add kibitzer (komodo), it doesn't show and also the first one disappears. Restarting lucachess doesn't help, I cannot start any of the created kibitzers in openings training. I have to remove the definitions of both kibitzers using Kibitzer -> Remove...
For now tracebacks are flushed to disk only after you close the program. It really inconvenient for catching bugs. All tracebacks should be saved immediately. When I played with #29 I had to make some changes to Init.py.
DEBUG = False
VERSION = "10.11"
import os
import sys
from Code.Constantes import *
if DEBUG:
prlkn("DEBUG " * 20)
from Code import VarGen
from Code import Procesador
from Code import Sonido
from Code.QT import Gui
class loghelper:
def __init__(self, logname):
self.logname = logname
def write(self, buf):
ferr = open(self.logname, "at", 0)
ferr.write(buf)
ferr.close()
def init():
if not DEBUG:
sys.stderr = loghelper("bug.log")
mainProcesador = Procesador.Procesador()
mainProcesador.setVersion(VERSION)
runSound = Sonido.RunSound()
[...snip...]
And remove this
if not DEBUG:
if okFerr:
ferr.close()
[...snip...]
But I'm really bad at Python so I guess you can invent better solution.
hello ,
1- if there would be an option to for available moves and stuff .it would be better instead of forcing to show them always,etc in blind chess when you hold a piece it show where is can be move it is kinda cheating for me ( i mean in the picture this little signs i mention about if i could not tell properly piece movements attacked pieces little hints unnecessary and disturbing)
2- i want to analyse a game freely like in lichess i mean i can move and see with my eyes my combination how strong but in lucas chess it is very hard to do so you can add variations to pgn but it is time consuming if you have time please try to free analysing with your own eyes you can move pieces freely and create your own variations easly.
3- in lichess the engine also shows the best move in visually it is also good instead of reading the best move from engine output it can auto arrow the best move.it should be nice if there is an option to we can see the best move in the chess board ,i tried to show on the picture.
also i put the lichess analyse windows if you interested please check lichess play a game and analyse it it is so easy you can input your own variations to it so easly.
note : well my knight arrow was wrong i realized later,it shows Nd7 instead of Rad8 pardon me
It's a minor issue with Personal Opening Guide. When there is a root node of an opening, say "1. e4" then if you highlight it (click with a mouse), it's not possible to unselect it anymore and enter any new starting move on the root level of the tree (e.g. "1. d4"). Taking the 1. e4 move back by "Previous move" arrow button, or selecting "1.d4" from the "Summary of ..." panel do not help, because "1.e4" is still highlighted, and a node for "1.d4" root node cannot be created in the tree of moves.
The only workaround is to close Personal Op. Guide, open it again and enter "1.d4" move via the board immediately (i.e. making sure you don't highlight the existing "1. e4").
Lucas Chess takes some five seconds to start a game, i.e. to let me make my first move, on an SSD system that does not have the same delay when running LucasChess under Wine.
Linux Mint 18.1 x64.
Hi,
I like the openings from book. It lets you play creatively within a solid framework. The trouble is, I have no idea which opening I'm playing; Or even if it is a standard opening variation at all.
The openings by repetition is ok if you want to practice specific variations. But with so many variations on say the sicilian, it's a pretty daunting task to even think of learning them all or even choosing which variations to learn first.
I'd like to pick a high level opening like the sicilian and have all the moves in the lower level variations at my (and my opponent's) disposal; Just like openings from book does. And when we move into a new variation, this could be indicated in the status bar. This would allow us to explore the openings more creatively.
Of course, you could still pick specific variations to practice when you want to.
Linux Mint 18.1 x64.
Some engines like Texel 1.06 (http://www.talkchess.com/forum/viewtopic.php?t=60774) don't provide anything after default part of the type string option assuming default empty string. Something like:
option name BookFile type string default
option name UCI_Opponent type string default
option name GaviotaTbPath type string default
Now Lucas Chess just ignores this setting and doesn't show it in the GUI. This change
def leeString(self, li):
if ( len(li) == 3 or len(li) == 4 ) and li[2] == "default":
self.default = "" if len(li) == 3 or li[3] == "<empty>" else li[3]
return True
else:
return False
in MotoresExternos.py fixes the issue for me.
So far as I can see - and I use Lucas Chess on Windows and on Linux under Wine - there's is no way to abort the process that is begun when one clicks 'help to move'. Since that process can take a long time - depending on one's settings and the power of one's computer - i suggest that some sort of option to abort would be a good idea.
I was entering an opening using Personal Opening Guide, having the board rotated (black at the bottom). After entering some annotations via Director (I marked weak squares on white's side of the board, as well as white's defense ideas) I closed the Director. After re-opening it the anotations I made were misplaced (mirrorded) on the director's board. I think this is because I started with rotated board.
See the two screenshots. The 1st screenshot shows how the director displays the anootations incorrectly (not in sync with the main board). The second screenshot shows the correct behavior, but this is only working if the board is not rotated when Director gets opened.
http://i.imgur.com/6TR0PWI.png
it is the best valued move but makes me lose my queen? :)
was only a pawn that got hit with the recommended move
Version 9.08
Traceback (most recent call last):
File "Code\QT\WBase.pyo", line 254, in procesarAccion
File "Code\Procesador.pyo", line 404, in procesarAccion
File "Code\Procesador.pyo", line 472, in opciones
File "Code\Procesador.pyo", line 519, in folder_change
AttributeError: Configuracion instance has no attribute 'changeFolder'
While doing some tactics I looked at saving the puzzle via Options. No I can no longer get into tactics. Selecting 'Play' returns me to the main screen. Can I fix this without restarting?
I now this was a coincidence. The supplied tactics file was incorrect.
hello when scrolling with middle mouse it is confusing.
1-when cursor on area A you had to scroll top to go forward at pgn
2-when cursor on area B you had to scroll down to go forward at pgn
3-when cursor on the outside of the area A and B nothing happens if you scroll
this is confusing.my suggestion is it is one way and regardless the cursor on which area.and i assume standart way of doing this it should be if you scrool down pgn should go forward like chessbase products
Left me preface this by saying that I am not familiar with Lucas Chess, so I could simply be missing something.
That being said, I cannot select any tiles in column C when in a game. The program seams to ignore the individual keystroke, but not other combination (ctrl+c and alt+c). I can, however, select tiles in that column with the keyboard when viewing the end-game board that is generated when the Lucas Chess initially runs.
Using the on screen keyboard makes no difference, I have no issue selecting pieces by mouse, and I have done the basic troubleshooting techniques (reinstall, restart, etc.). Other columns have no issue.
Lenovo ThinkPad e540
Windows 10 Build 15063
Python 3.6.1 Installed (if that could have any effect)
Lucas chess is a great job.
In the expedition of everest, with the 1106 version, after the engine has analized the move the game don't continue.
Please consider looking into my wiki page:
https://github.com/fonkap/lucaschess/wiki/Running-in-windows
Sometimes when a tutor suggest a better move clicking on There are XXX best moves
-> Show tutor
just ignored.
I made this changes (marked with # <--) to GestorEntMaq.py to see wtf is going on:
if siTutor:
sys.stderr.write("TUTORR!") # <--
tutor = Tutor.Tutor(self, self, jg, desde, hasta, False)
if self.aperturaStd:
liApPosibles = self.listaAperturasStd.listaAperturasPosibles(self.partida)
else:
liApPosibles = None
sys.stderr.write("1") # <--
if tutor.elegir(self.ayudas > 0, liApPosibles=liApPosibles):
sys.stderr.write("2") # <--
if self.ayudas > 0: # doble entrada a tutor.
sys.stderr.write("3") # <--
self.reponPieza(desde)
self.ayudas -= 1
desde = tutor.desde
hasta = tutor.hasta
coronacion = tutor.coronacion
siBien, mens, jgTutor = Jugada.dameJugada(self.partida.ultPosicion, desde, hasta, coronacion)
if siBien:
sys.stderr.write("4") # <--
jg = jgTutor
self.setSummary("SELECTTUTOR", True)
else:
sys.stderr.write("self.ayudas: " + str(self.ayudas) + "\n") # <--
sys.stderr.write("self.aperturaStd: " + str(self.aperturaStd) + "\n") # <--
sys.stderr.write("liApPosibles: " + str(liApPosibles) + "\n") # <--
sys.stderr.write("5") # <--
if self.configuracion.guardarVariantesTutor:
sys.stderr.write("6") # <--
tutor.ponVariantes(jg, 1 + self.partida.numJugadas() / 2)
del tutor
sys.stderr.write("7\n") # <--
Here is the result:
TUTORR!1234567
TUTORR!1234567
TUTORR!1234567
TUTORR!1234567
TUTORR!1234567
TUTORR!1self.ayudas: 2
self.aperturaStd: None
liApPosibles: None
567
So in a normal case it went through all the branches, in case of error it breaks with self.aperturaStd==None
. I have no idea what that means.
The bmi2 engine versions crash my i5 system. Wouldn't it be more compatible to have the plain x64 option. And maybe a separate bmi2 option for those that can handle it.
Not a big deal at the moment because it only affects a couple of engines. But in the future you may be using more 64bit engines.
Hi,
I followed the installation in LinuxInstallation.md and ran: python Lucas.py
Traceback (most recent call last):
File "Lucas.py", line 61, in
import Code.Init
File "./Code/Init.py", line 5, in
from Code import Procesador
File "./Code/Procesador.py", line 6, in
from Code import Routes
File "./Code/Routes.py", line 5, in
from Code import Partida
File "./Code/Partida.py", line 2, in
from Code import ControlPosicion
File "./Code/ControlPosicion.py", line 1, in
import LCEngine
ImportError: libirina.so: cannot open shared object file: No such file or directory
Any idea?
Thanks,
Jianliang
i think i accidently deleted a post i was reguesting the mouse scroll feature for pgn forwarding when the cursor on the move list if you scroll down and pgn goest forward but when the cursor on the chess board when you scroll down pgn goes backward it should be general and regardless the mouse cursor place like in chessbase when you scroll down it always forwards the pgn regardless of the position of the mouse cursor
Hi,
I have noticed that when you import a PGN in the database, the matches that don't start from standard position (those how has a FEN position) fail to load. With PGN viewer works fine.
Also I have seen that when is there a FEN label it is not checked that the SetUp label is also present to know if the game should start from that FEN position or from the standard one.
At least I haven't been able to find in the code where it is checked.
I have found FEN setup in PGNreader.py: Game.readLabel(self, liTxt)
is it right?
The PGN starndard states:
9.7.1: Tag: SetUp
This tag takes an integer that denotes the "set-up" status of the game. A value of "0" indicates that the game has started from the usual initial array. A value of "1" indicates that the game started from a set-up position; this position is given in the "FEN" tag pair. This tag must appear for a game starting with a set-up position. If it appears with a tag value of "1", a FEN tag pair must also appear.9.7.2: Tag: FEN
This tag uses a string that gives the Forsyth-Edwards Notation for the starting position used in the game. FEN is described in a later section of this document. If a SetUp tag appears with a tag value of "1", the FEN tag pair is also required.
I like LucasChess more every time. Nice work
Game clocks misbehave when PC suspends and resumes, they are not paused. When I suspended my laptop in the middle of the game and resumed it an hour later, my clock was down to 0 and I lost on time immediately :/
Here is a hint about how this could be handled in Qt world:
http://stackoverflow.com/questions/7871284/qt-application-suspending
Hi, thanks for the great work!
I have managed to install 11.04a on Linux 32-bit (with some issues, see below).
The game starts up and I can do options and trainings.
However it seems to hang immediately when a chess engine is used:
My Installation installation process & issues:
Used to be able to change board size but in 10.12a the popup menu is gone from Options/Configuration/Boards, is there another way to do it ?
Some engines like ProDeo really prefer to be closed in a proper way sending quit instead of just killing the process.
Here's a proposed change for EngineThread.py.
[...]
import sys
[...]
def close(self):
self.working = False
if self.pid:
self.put_line("quit") # try to close the engine properly
wtime = 40 # wait for it, wait for it...
while self.process.poll() is None and wtime > 0:
time.sleep(0.05)
wtime -= 1
if self.process.poll() is None: # nope, no luck
sys.stderr.write("INFO: the engine %s won't close properly.\n" % self.exe)
self.process.kill()
self.process.terminate()
self.pid = None
No sure if I've broken anything, my python is retarded. 😱
Hi,
Apologies if there is a way to do this already. In other programs you can select 'Program Plays Fast' when playing against the computer at long time controls. The computer will then move very quickly (i.e. max a few seconds).
I have tried playing against 'ferenc' (1500) and it seems to take a long time (sometimes a minute) to reply to my moves when playing a 45+45 game. I am pretty sure the program doesn't have to think that long to play at 1500 level, but maybe I misunderstand something.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.