Code Monkey home page Code Monkey logo

picochess's People

Contributors

dependabot[bot] avatar djdekker avatar gitter-badger avatar ifekali avatar jromang avatar locutusofpenguin avatar niklasf avatar pablo2000 avatar precju avatar raimarbs avatar sshivaji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

picochess's Issues

Sliding pieces when making a move

If I play 1.e4 by lifting the pawn from e2 and then placing it on e4, the code works fine.

However, as Jonas has noted, if one slides the pawn from e2 to e4 (meaning the pawn makes a stopover at e3 as well) it does not work. It currently double beeps and shows a white move instead of a black one. The Pycochess tree handled this by taking the first event and waiting a second until the dgt events are done. Similar logic waiting for a "quiet" period might be applicable here. Sliding pieces is a common method to input moves.

No display on checkmate

Simply stops on checkmate, no confirmation on display. "CKMT" or something on display with maybe three beeps at the end of game would probably be appropriate.

Handling picochess.ini

Reports an error when trying to set

enable-dgt-board-leds = false

I have both USB eboard and a Rev II, it's a pain switching between the two (can't wait for setting options and settings via web GUI) as the complete line needs to be inserted or deleted. Commenting out the line doesn't work.

Play stops after twenty moves or so ...

I have the picobot (ver. 031, Pi2, USB board, DGT3000 clock) set to Fun opening book, Level 11 and 15|5 time control. After twenty moves or so, the clock shows 0.00 - 0.00 and play stops.

Nothing in the log:

2015-03-06 23:21:56.639 DEBUG dgt - read_message: r5k1/ppqn1ppp/2p2n2/3p4/1P6/P1N1QBP1/2P2P1P/R5K1
2015-03-06 23:21:56.640 DEBUG dgt - read_message: Fen
2015-03-06 23:21:56.641 DEBUG picochess - main: Received event in event loop : Event.FEN
2015-03-06 23:24:58.601 DEBUG dgt - read_message: <-DGT [Messages.DGT_MSG_FIELD_UPDATE], length:2
2015-03-06 23:24:58.603 DEBUG dgt - send_command: ->DGT [Commands.DGT_SEND_BRD]
2015-03-06 23:24:58.706 DEBUG dgt - read_message: <-DGT [Messages.DGT_MSG_BOARD_DUMP], length:64
2015-03-06 23:24:58.708 DEBUG dgt - read_message:
.K.....R
P.P..P..
.PBQ.N.P
.p....P.
....p...
..n..p..
ppp.nqpp
.k.....r
2015-03-06 23:24:58.709 DEBUG dgt - read_message: r5k1/ppqn1ppp/2p2n2/3p4/1P4p1/P1N1QBP1/2P2P1P/R5K1
2015-03-06 23:24:58.710 DEBUG dgt - read_message: Fen
2015-03-06 23:24:58.712 DEBUG picochess - main: Received event in event loop : Event.FEN

0.30 release todo

  • fix issue #15 (PGN header wrong when Black)
  • add enhancements #26 in User Interface:
  • Show arrows
  • Version & build no. or date
  • IP address
  • Level of play
  • Time control used
  • Opening book used
  • Current mode of operation
  • fix issue #27
  • fix issue #28 (lever reset display)
  • fix issue #30 (nasty, fails to display coputer move after countdown)
  • bring back "book" move display
  • move default UI http port to 80
  • move default logfile to webspace (on my machine http://pi.local:5000/static/picochess.txt)
  • truncate the logfile for easier UI retrieval

Tablebase support

-Put the syzygy tbs on the image (/opt/syzygy/)
-Replace stockfish with a version supporting tbs
-Add a command line option to pass the tb path parameter and set the UCI option if the engine supports it.
-Change the init script to use the tbs.

Display IP address on button press

At startup only. This is useful for Windows users (without iTunes). Last number of the local subnet is probably sufficient, there are display constraints.

Reboot or re-init the Pi when locked?

When several chess pieces are misaligned or settings are not done correctly, the pi seems to be in a lock-up / idle state and a new game cannot be started.
How can I bring the Pi in a starting position with settings as default via the chess board ? I have no access via terminal or keyboard, only the board.

Observe mode displays nonexistent checks

Playing these moves in observe mode:

  1. e4 d5
  2. f4

... results in "f4+" in display, but there is no check on the board. The check (plus) sign will henceforth stay on display.

  1. ... c5

... displays "c5+".

After

  1. exd5

... machine halts. (Any capture will halt the observe mode.)

PGN download not working on Odroid-U3

"Webpage is not available." (version 0.29)

Also, my odroid would not autopupdate. Could this be due to picochess location in /home/odroid/git/picochess on out image?

Trouble playing with White after playing with Black

Will not switch cleanly back to playing with White. Lifting white king restarts game, but machine still insists on making first move with White.

Only way to reset the game in this situation is to put white queen on C5, selecting Game mode.

Book move confirmation

When (immediately after) user makes a book move, some confirmation in display should be possible. (Some versions ago, Pico displayed "Book" for a moment.) A line in .ini file disables this for purists.

Very useful when trying to learn book openings, user can takeback immediately when out of the book trying to follow it.

Autodetect DGT 3000 or XL clock

From Ben@DGT:
From Frits, I understood that there is not yet an automatic determination whether DGT3000 or DGT XL is connected. For detecting the DGT Clock version, the message DGT_CLOCK_MESSAGE contains a sub-command DGT_CMD_CLOCK_VERSION, that will result in information on the clock version.

DGT 3000 will return version 2.x, DGT XL will return version 1.x. Do you have this information, and could you implement such automatic version detection?

Remote play (against friend or tutor)

User plays on her e-board while a friend or remote tutor connects via web UI and plays the game remotely (via browser UI) while picochess records moves to PGN. Remote player's moves are displayed on the clock, with LEDs on the Rev II. (No engine.)

F3 blitz setting incorrect

Setting Blitz level 25 minute game with 5 second Fischer increment shows F 7 1 and should be F 25 5.
detected in version 0.30

Displaying 'MATE' when it's a draw

After a threefold repetition of moves Picochess does not report a draw but displays 'MATE':

8/4k3/2p2p2/1p1p2p1/pP1P1PP1/P1P1K1P1/8/8 b - - 2 58

58... Ke6 59. Kf3 Kd6 60. Ke3 Ke7 61. Kf3 Kd6 62. Ke3 Kc7 63. Kf3 Kd6 64. Ke3 Ke6 65. Kf3 Kd6 66. Ke3 Ke6 67. Kf3 Kd6 1/2-1/2

Picochess 0.33 on Raspberry Pi 2
DGT BT Board/3000 Clock

Online Chess on FICS/ICC

I think its quite to play online chess using Picochess and a Raspberry Pi - WITH NO PC, monitor and cable. Its just necessary to enter your name and Login Number ONCE - Using the clock buttons - just one Time and SAVE.
After this you could define - and store your favourite seek wishes. For example:

seek r 1600-1800 20

And someone with elo 1600-1800 would accept and play a rated - 20 minutes game. It would be soooooooo cool. Can you make it?

Select colour to play the game: display text

When you select that the pi should start the game, the black king should be lifted and placed back. The display reports "BLACK". Could that be changed into "PLAY BLACK" ?
When player wants to start the game, the white king should be lifted and the display reports "GAME". To be consistent could that be changed into "PLAY WHITE" ?

Python 3.4 requirement

If one uses python 3.3 (or any python3 less than 3.4), there is a need to execute "pip install enum34". Should this package also be in the source tree or indicated via a requirements.txt?

Bluetooth connection garbled when using XL clock

Bluetooth board only works via USB when using old XL clock. When connecting via bluetooth, Picochess reacts to first move (is aware of board), but halts immediately thereafter.

OTOH, connection to Revelation II chessbot (remember, it emulates the XL clock and only connects via bluetooth) seems normal, works.

Time controls broken

On setting up say 10 min blitz game, the time counters will be reset after every move. Then a few moves into the game, "Time" will show in display with a beep, halting the game.

It then enters some kind of loop, beeping every 60 seconds or so, displaying "Time" with a beep.

Add a select engine option

I want to put every UCI engine in a certain folder and to select the Engine I want in the menue.
Can you make it?

Peter

Books not working

When trying to select a book, picochess will halt. Responds to mennu changes with extra queens, but won't start game.

Bluetooth connection not working in 0.28 image

For bluetooth, the following typically happens.

  1. Scan for devices
  2. Find device with name DGT (DGT chess board)
  3. Get its mac address
  4. Pair to this mac address with code '0000'
  5. Bind this to /dev/rfcomm0
  6. Connect to that device on startup

Unfortunately, with the current raspbian kernel (3.12.x), step 5-6 is broken. The idea of binding a device is that when pyserial opens the device, only then a connection is made. This is sort of a late binding. Late binding unfortunately is broken in the kernel. Refer to https://bugzilla.redhat.com/show_bug.cgi?id=1060457

To fix the raspbian image and downgrade the kernel to 3.10.x, just execute the following command:
"sudo rpi-update f6eef32dd6388c3b04dbf462bd324d93281bf397"

Detailed solution --

I have committed a new init.d script and a bluetooth script. Checkout new tree.

Replace /etc/init.d/picochess with https://github.com/jromang/picochess/blob/master/scripts/picochess.init

Then:

  1. To downgrade kernel, execute:

"sudo rpi-update f6eef32dd6388c3b04dbf462bd324d93281bf397" one time

  1. The new script should work as is.

Extra inconsequntial "Ghost" move occasionally displayed

This ghost move does not have an impact on the game.

It can be reproduced like below. There should not be a knight on a3 after the computer move.

krpan:picochess jonas$ python3 picochess.py -e /Applications/Deep\ HIARCS\ 14\
WCSC/stockfish-dd-32
PicoChess v028:>e2e4
PicoChess v028:>Book move

r n b q k b n r
p p . p p p p p
. . . . . . . .
. . p . . . . .
. . . . P . . .
N . . . . . . .
P P P P . P P P
R . B Q K B N R
Computer move : c7c5

Confirmation sound when executing correct computer move

At this time (ver. 0.30) Picochess beeps when engine shows a move on display, but not when user executes said move. Beeping again when user executes correct move would help avoid entering a wrong move (thus halting Picochess).

All the beeping might prove annoying to some (I love it) and should probably be switchable in settings.

Clock fails to display move

After setting the time controls to 10 secs per move, my clock (DGT 3000) sometimes does not display the computer move. After countdown the display stays at 00:00, thus giving the impression of a stuck/hung program.

Play cannot be continued until after looking up the move in UI and executing it on board.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.