Coder Social home page Coder Social logo

jhonnold / node-tlcv Goto Github PK

View Code? Open in Web Editor NEW
22.0 22.0 8.0 4.62 MB

Tom's Live Chess Viewer for CCRL Broadcasts on the web!

Home Page: https://ccrl.live

License: MIT License

JavaScript 25.49% TypeScript 56.56% EJS 7.64% CSS 9.89% Dockerfile 0.41%
ccrl chess chess-engine tlcv

node-tlcv's People

Contributors

dav1312 avatar dependabot[bot] avatar ianagbip1oti avatar jhonnold avatar kmar avatar mrbrain295 avatar raklaptudirm avatar spamdrew128 avatar tsoj avatar

Stargazers

 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

node-tlcv's Issues

Tablebase

Add engine tablebase while playing.

Change Pedantic Logo (again)

My peers prefer the eyeball motif for the Pedantic logo and I want to oblige them. Here is a new logo file that isn't as meme-ish as the prior one. It is certainly not a priority to replace, but when you get a chance I would be much obliged.
pedantic.zip

limit pv length

Jay, might something like this work (in chess-game.ts)
it's javascript?

function maxString (string = '', max = 0) {
return string.substring(0, max)
}

public set pv(v: Array) {
this._pv = maxString(v, 64);
}

Discord webhooks

Could add the ability to post to discord webhooks on game start/result. Would want a way to keep the webhook urls out of GitHub tho

Nodes and Nps are not updated when the engine doesn't report them alongside with PV

When playing, my UCI engine doesn't send the number of nodes alongside with PV, but reports it separately. For example, the output may look as follows:

go infinite
...
info depth 11 time 1160 pv d2d4 g8f6 b1c3 d7d5 g1f3 b8c6 e2e3 c8f5 f1d3 f5d3 d1d3 score cp 57
info depth 12 time 2996 pv e2e4 e7e5 g1f3 g8f6 b1c3 b8c6 f1d3 f8d6 e1g1 e8g8 c3b5 d6c5 score cp 16
info nodes 18567391 time 3010 nps 6166569
info depth 13 time 4993 pv e2e4 e7e5 g1f3 d7d5 f3e5 b8d7 e5d7 c8d7 e4d5 f8d6 f1c4 d8h4 d1e2 score cp 42
info nodes 36638104 time 6022 nps 6083159
info nodes 54337370 time 9004 nps 6034702

Still, web UI shows Nodes: 0.00 instead of the reported number.

I am not sure whether it's an issue in node-tlcv or the underlying TLCV server.

Height of right frame elements unstable

Visible in Firefox and also Edge under Windows and Linux

The engine boxes switching horizonatl scroll bar on/off with changing length of the pv. That makes the whole frame "unstable".

Somehow communicate tlcv.net spectators to normal users

Currently, users of Livius and Tom's Live Chess Viewer only see "tlcv.net" as spectator. It would be nice to know though, who's currently watching.

Some hacky solutions I could think of:

  • Change the username of tlcv.net everytime the list of tlcv.net users changes. So the username wouldn't be "tlcv.net" but something like "tlcv.net (User1, user_2, Lars, USER-3)"
  • add a new connection for each new spectator, so their usernames would show up properly. This (and the first idea as well) however would require a reconnection each time someone starts watching on tlcv.net or leaves.
  • add some command like "!users" which will tell tlcv.net to print all spectator names

Engines that send Chess960 castling

In particular, the engine Cheers sends castling via uci Chess960 style (e1h1/e1a1), Algorhythm-sxv/Cheers#2, It appears that the viewer does not handle this meaning the view of the board gets out of sync with the actual game.

Why this would make sense: chess.js doesn't handle chess960. It parses moves by checking against a list of legal moves, and seeing if the string sent matches one. Since chess960 castling would not be a legal move, it would fail.

Why this wouldn't make sense: TLCV sends moves to the viewer in SAN format. Since TLCV/ChessGUI seems to understand and handle e1h1 as castling just fine, then wouldn't it send it to the viewer as "O-O"?

It may be worth adding a log statement before move parsing so can check what the viewer is actually receiving in these cases. Edit: nvm, there's a log message, Failed to parse, that should log this.

I also don't know if there's something the viewer could do better in the more general case of receiving a move it doesn't understand.

Investigate PGN resets

Moves are failing to parse when the board state is reset to 0 on a valid startpos move coming later in the game.


2023-07-11T09:17:51.382Z [DEBUG] [P16065] Message received from 122.58.163.86:16065: < 216619>FEN: rn1qk2r/pp2bppp/4pn2/3p4/4P3/3P1BP1/PP3P1P/RNBQ1RK1 b kq
2023-07-11T09:17:51.382Z [DEBUG] [P16065] Sending message ACK: 216619 to 122.58.163.86:16065
2023-07-11T09:17:51.382Z [DEBUG] [P16065] Message received from 122.58.163.86:16065: < 216620>WMOVE: 9. e4
2023-07-11T09:17:51.382Z [DEBUG] [P16065] Sending message ACK: 216620 to 122.58.163.86:16065
2023-07-11T09:17:51.382Z [DEBUG] [P16065] Message received from 122.58.163.86:16065: < 216621>FMR:  0
2023-07-11T09:17:51.382Z [DEBUG] [P16065] Sending message ACK: 216621 to 122.58.163.86:16065
2023-07-11T09:17:51.440Z [DEBUG] [P16065] Processing a total of 3 message(s)
2023-07-11T09:17:51.440Z [ INFO] [P16065] Updated game 16065 - FEN: rn1qk2r/pp2bppp/4pn2/3p4/4P3/3P1BP1/PP3P1P/RNBQ1RK1 b kq - 0 1
2023-07-11T09:17:51.441Z [ INFO] [P16065] Updated game 16065 - Color: white, Last Move: e4
2023-07-11T09:17:51.441Z [ INFO] [P16065] Requesting opening for game 16065 from https://explorer.lichess.ovh/master?play=e2e4
…
2023-07-11T09:18:06.943Z [ WARN] [P16065] Failed to parse dxe4 for game 16065, fen rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq - 0 1! Loading from FEN…

Dark Mode Support.

Hello.

It would be nice to have a dark mode. It's more comfortable for the eyes as well.

Remaining time displayed incorrectly

In a 40/25 game, after move 40 I saw that the remaining time for an engine didn't get reset (Zahak was shown to have no time left), but as soon as I refreshed the page, the times got displayed correctly... some caching problem maybe?

Add feature - add engine logos

Graham has a set of engine logos.
Would be really cool if the logo of an engine would be shown next to its name in the web version of the broadcast

PGNs of games as tourney plays out

Can we get at a page with PGNs of the tourney played so far? Would be useful. At the moment there doesn't seem to be an easy way to get at, say, the penultimate game PGN, let alone all the other priors.

Add option to show pv length like 5 plies

If there is mate score, show all pv moves, if not just show 5 plies.

It is odd number so I can analyze, like:
mymove, yourmove, mymove, yourmove, mymove -- then see the eval.

FEN move count inconsistency

When the opening line is running, FEN gets updated accordingly, but after the engines start playing, the move counter gets reset to 1.

For example:
image

This game is not 3 moves in.

Add Stockfish 15's analysis.

Hello.

It may benefit the viewers to see what Stockfish thinks of the game. Possibly, a 3-line PV showcase on the left?

Variant boards have some sort of bug

Sometimes, when I am watching a game, the variant boards will have two black kings and one white king, or vice versa, or an obvious material imbalance in a position with an even score, because one of the pieces was not properly blanked out. I am not sure if it is specific to Firefox, which is the browser I am using.

Chessmaster 9000 logo

Hello! Attached is a logo for CM9000. Hopefully it is in the correct format. Thank you!
CM9K

Update page title when a new game starts

Currently, the page title is only set when the page first loads, so the page title may indicate a different match to the one that is currently running if a new game has begun.

pgns files cannot be loaded

The pgns files in the PGNS section contain a game on a single line. The XBoard application cannot load it (line too long)

tlcv.net is down

Graham says that you said that tlcv.net is dead. I'm trying to figure out what we can do to get it back up.

Show scheduled game number

Given that Schedule takes you to this ordered lists of games to be played, it would be good to be able to see in the viewer a reference of which game is being played.

Use case for this is knowing when your engine plays (i.e. games # 30, 44, 58, etc.) and with a quick glance at the viewer being able to estimate how long until their next one.

An option to do that without thinking too much about the UI is by adding the game number at the beginning of the [Server] message, so at least you can check the # of the previous game.

Feature Request - Show board history

A built-in game viewer where a user can view the history of moves made during a game, and navigate to the board state before a move has been played.

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.