Live broadcast of engine pv

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Live broadcast of engine pv

Post by hgm »

I think Arena supports saving of the thinking time for each move, in the same way as WinBoard. From this and the TC tag the remaining time on the clock can be derived.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Live broadcast of engine pv

Post by Rebel »

Ferdy wrote:
Rebel wrote:Got it to work.

http://rebel13.nl/pgn4web/live1.html

Currently for version 241 only and the hopping needs a fix, point is, it is doable and quite easily.

Basically you can put anything in the file, even tell random jokes to entertain the audience in case the game is in a boring stage.
I am using chrome and it seems like the live pv is not consistent, after forced refresh it would show the pv before the move is made on the board but later, the pv is no longer updated. If you forced to refresh again, the live pv will show up and on later moves the live pv is no longer updated again. So I need to press the refresh button every time I wanted to see the live pv displayed.
I noticed the same with Firefox :roll:

There are a lot of incompatability issues among browsers.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Live broadcast of engine pv

Post by Rebel »

hgm wrote:I think Arena supports saving of the thinking time for each move, in the same way as WinBoard. From this and the TC tag the remaining time on the clock can be derived.
Yes, I think that's the way TLCV create its clocks on the screen. However for web programming we will have to rely on the functions PGN4WEB offers.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Live broadcast of engine pv

Post by Rebel »

Ferdy wrote:
Rebel wrote:Got it to work.

http://rebel13.nl/pgn4web/live1.html

Currently for version 241 only and the hopping needs a fix, point is, it is doable and quite easily.

Basically you can put anything in the file, even tell random jokes to entertain the audience in case the game is in a boring stage.
I am using chrome and it seems like the live pv is not consistent, after forced refresh it would show the pv before the move is made on the board but later, the pv is no longer updated. If you forced to refresh again, the live pv will show up and on later moves the live pv is no longer updated again. So I need to press the refresh button every time I wanted to see the live pv displayed.
Better now with Chrome?
User avatar
hgm
Posts: 27796
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Live broadcast of engine pv

Post by hgm »

Rebel wrote:Yes, I think that's the way TLCV create its clocks on the screen.
TLCV gets the clocks (and everything else) directly from the GUI <-> engine communication (time and otim commands, after which it starts counting down independently for the side to move).
However for web programming we will have to rely on the functions PGN4WEB offers.
Why? For one, you can change it. Or you could use another viewer. Or you could write your own.

PGN4WEB is pretty useless anyway: it only does orthodox Chess....

I have plenty of viewers. E.g. http://hgm.nubati.net/variants/elven/ . Or the older one ('ChessLive!'): http://hgm.nubati.net/WCCC/game1/chess.html .
Last edited by hgm on Sat Jul 08, 2017 11:14 am, edited 1 time in total.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: Live broadcast of engine pv

Post by Rebel »

hgm wrote: PGN4WEB is pretty useless anyway: it only does orthodox Chess....
:lol:
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Live broadcast of engine pv

Post by Ferdy »

Rebel wrote:
Ferdy wrote:
Rebel wrote:Got it to work.

http://rebel13.nl/pgn4web/live1.html

Currently for version 241 only and the hopping needs a fix, point is, it is doable and quite easily.

Basically you can put anything in the file, even tell random jokes to entertain the audience in case the game is in a boring stage.
I am using chrome and it seems like the live pv is not consistent, after forced refresh it would show the pv before the move is made on the board but later, the pv is no longer updated. If you forced to refresh again, the live pv will show up and on later moves the live pv is no longer updated again. So I need to press the refresh button every time I wanted to see the live pv displayed.
Better now with Chrome?
Wow it looks great :)
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Live broadcast of engine pv

Post by Ferdy »

Finally implemented here.

http://www.chess.x10host.com/pgn4web/index.html

I rewrite the pgn output of ChessGUI to a different format, now the pv (taken from TLCV_File.txt output from ChessGUI) is embeded as part of move comment, so now I get pgn and pv at the same time, send it to server via ftp, then extract the pv via pgn4web custom function, and just use a javascript to display the pv on the page, no more server scripts needed.

I think Matthias Gemuh author of ChessGUI can easily incorparate this change, adding pv to the move comment.
User avatar
Graham Banks
Posts: 41433
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: Live broadcast of engine pv

Post by Graham Banks »

Any chance that you'll release a new Deuterium? :P
gbanksnz at gmail.com
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Live broadcast of engine pv

Post by Ferdy »

Graham Banks wrote:Any chance that you'll release a new Deuterium? :P
It is for release :) but I get something to do on ending after seeing live in broadcast. Imagine in kbp v kb, the kbp side has winning score even though from human perspective the position is just equal.