[pythonvis] Re: Workbench?

  • From: "Gabriele Battaglia" <dmarc-noreply@xxxxxxxxxxxxx> (Redacted sender "iz4apu@xxxxxxxxx" for DMARC)
  • To: pythonvis@xxxxxxxxxxxxx
  • Date: Mon, 22 Jun 2015 10:33:15 +0200



Reply to the Jeffrey Turner's message, wrote on 19/06/2015 at 17:28:

Hi Gabriele,
Hello Jefrey.


Randy told me you worked on a Python chess clock, which is very exciting
news to me. I have written these specs up, and would like to try to code it
up. I'd appreciate any feedback you might have to offer.
Yes, I did.
Here's my feedback.

Chess Clock with Game Record Specifications

Basic Overview
A chess clock is actually two clocks, used to track the time of two players
in one game. Usually, both clocks are set for the same period of time,
although sometimes one player will give his opponent more time as a
handicap. The Black player starts the White Player's clock to start the
game. Physical clocks have two buttons, one for each player. When Black
presses the button down on his side of the clock. White's clock begins
counting down the allotted time. As soon as he makes his move, he presses
his button, his clock stops at whatever time he has left, and Black's clock
starts counting down. If either player's clock runs down to 0, he loses the
game, no matter what the status of the board is. For our purposes, both
clocks will be run by a timekeper who will also record the game by entering
chess notation for each move played.
Correct.
Often, by the way, are players themselves that drive the clock and insert the moves. Time Keeper or referee should be call just in case of some complains.

Sample Chess Notation
1.e4 c5
2.Nf3 e6
3.d4 cxd4
Knowledge of chess notation is assumed.
Usually you don't go new line each move but each 4 or 6 moves. A move is made by a progressive number, plus the white's half-move, plus the black's half-move.

Sample Notation with times for each player
1.e4 c5 59:57 59:54
According to the PGN specification, times should be in square brakets.
E.G.: 1.e4 c5 [59:57 59:54]

Inputs
the computer will provide the number of each move. The operator will provide
some initial information, the names of the players, the event, the date, the
timekeeper's name, any pause points, the time to be set on each clock, and
replenishment values.

Automatic Pause Points and Clock Replenishment It is common for a timekeeper
to alert the players when certain times have been reached. Often, both
players will have one hour to start the game, and must complete 30 moves
within that hour. After the player with the least amount of time left has
played 20 minutes, when his next move is entered, both clocks are paused,
and the timekeeper reports how many moves have been played and how much time
is remaining on each clock.
Automatic Pause Reports will look like this:
Move [move number],White Time: 59:44, Black Time: 59:32, [White or Black] to
move.
Automatic pause points are often 20, 40, 50, and 55 minutes, and the pause
actually happens whenever the player with the least time left has made a
move after crossing these time limits. Once 30 moves have been completed by
both players, they receive an additional amount of time which will be
entered at the start as replenishment time.
Various considerations here:
1. Sometimes it would be better to say players how much time left to 0, instead of how much time is passed.
2. Automatic pauses is not always wanted by players but they can ask the TK about their time, so the clock must be queried it must be provide the clocks status whenever is needed. In my clock, I made in Python, I have a prompt waiting for commands during the time counting, the most wanted and used feature my friends love is the clock comparison: the clock answers something like
"Paul is ahead by 3 minutes and 28 seconds over John.
3. The amount of time to add to the clocks and the number of move in which it is added changes all the time and depends from the tournament. It must be completely customizable by the TK at the beginning of the match.
4. Sometimes there is some complains about the running game, so the TK (or players themselves) must have the possibility to turn off and on the clocks all the time. Furthermore, it must be possible add and subtract an arbitrary amount of time to one or both clocks, dipending on what is happaning.
5. You showed a clock with hours and minutes, it's correct but remember that, in certain games, usually among sighted people, they play very very fast and with small amount of time left, especially when the use the Fisher Clock, so the internal counting, I mean in terms of code, must be done with quite high precision.
6. Beside the initial parameters we considered, the clock should work also as a fisher clock: so, no extra time after a specified numbers of move, but a fixed, and customizable amount of time, in general some seconds, to add every half-move to the active player.

Resuming Play
After time reports have been given, the timekeeper will resume play,
starting the clock of the appropriate player, by pressing enter.
Confirmation of which clock is starting will be given:
Starting clock for [black or white, depending]
Ok.


Move [move number],White Time: 59:44, Black Time: 59:32, [White or Black] to
move.
Play will resume and the player's clock that was stopped will resume running
when enter is pressed. Confirmation of the restart will be given:
Starting clock for [black or white, depending]
Ok. Remember that TK must have the possibility to change the move counter due to possible failed check in chessboard position.


Time Check
Entering 't' will display the same message as for pauses, but the running
clock will not be stopped.
Move [move number],White Time: 59:44, Black Time: 59:32, [White or Black] to
move.
Here I would insert the comparison clock feature I told before. And, instead of elapsed time, I would give the remaining time.


Corrections
The timekeeper can correct the last move entered by entering 'c'. This will
pause the running clock, display the pause message (see above), and undo the
last move. The stopped clock will restart when another move is entered and
the restart confirmation message (see above) will be displayed.
Oh sorry, I didn't read.
Ok.


Game completion
The timekeeper will indicate a checkmate by entering '#', a draw by entering
'=', and a resignation by entering 'r'. the running clock will be stopped
and the game record written.
Appended to the game record, I would add also some statistics, for the match in general and for players:
1. amount of time used up to initial time available, divided in percentage for each players.
2. Average time per move.
3. longest and shortest move
and so forth.


Exclusions
This program will nott check for valid chess moves. It will not indicate
checks, or e.p. notifications, (a type of pawn capture. it will not record
board positions to aid in determining draws by repetition.
ok.
In My clock I've decided that, the first 8 characters entered not beginning with a (.) dot, are considered a move notation. All the command instead must begin with a dot and cause an answer from the clock.


Possible Enhancements
Future versions of the program could provide alternative notation outputs,
perhaps one with times, and one without. Game records could be automagically
emailed to the players and tournament directors upon completion of the game.
The automailing is quite simply to implement. I already have the function written, if you like.

Happy coding and, if you need some beta testing, I'm here.
Gabriel.
List web page is //www.freelists.org/webpage/pythonvis

To unsubscribe, send email to pythonvis-request@xxxxxxxxxxxxx with "unsubscribe" in the Subject field.

Other related posts: