Skip to content

agentx-cgn/Caissa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stockfish versus Alpha Zero

https://deepmind.com/research/open-source/alphazero-resources

JS Engines

https://github.com/josefjadrny/js-chess-engine/commits/master
Nanochess-JS : https://github.com/bormand/nanochess/tree/master/original
looza http://op12no2.me/toys/lozza/index.htm
GarboChess-JS

scrollend:

https://stackoverflow.com/questions/46795955/how-to-know-scroll-to-element-is-done-in-javascript/51142522#51142522

Versioning

https://stackoverflow.com/questions/12082981/get-all-git-commits-since-last-tag
https://www.npmjs.com/package/webpack-version-file

git

git rm  --cached .eslintignore
https://stackoverflow.com/questions/9683279/make-the-current-commit-the-only-initial-commit-in-a-git-repository

certificates

https://www.tunecrew.com/2019/01/13/https-for-local-development-with-react-django-uwsgi-docker/
https://github.com/FiloSottile/mkcert
https://coderwall.com/p/wv6fpq/add-self-signed-ssl-certificate-to-android-for-browsing
mkcert localhost 0.0.0.0 ::1

COntent

https://en.wikipedia.org/wiki/List_of_chess_traps
https://www.google.com/search?client=ubuntu&channel=fs&q=List+of+chess+games+wikipedia+pgn&ie=utf-8&oe=utf-8
https://www.chessclub.com/help/PGN-spec
https://en.wikipedia.org/wiki/Rules_of_chess

gh-pages

test: rm -r * cp -r ../caissa/dist/* . git add . && git commit -m "dist" && git push

ECOS

https://github.com/niklasf/eco/blob/master/a.tsv
https://www.cs.kent.ac.uk/people/staff/djb/pgn-extract/

Techs

https://javascript.info/fetch-progress
https://50linesofco.de/post/2019-07-05-reading-local-files-with-javascript
https://carlanderson.xyz/how-to-keep-your-flexbox-square/
https://exploringjs.com/es6/ch_modules.html
https://github.com/andyruwruw/chess-image-generator

https://marcelk.net/chess/pieces/
https://www.ficsgames.org/ 253,724,181	games stored
https://github.com/Scorpibear/bestmovedb
https://ebemunk.com/node-uci/#enginegoinfinite

https://www.npmjs.com/package/worker-loader-wasm
https://frpays.github.io/lc0-js/engine.html
https://github.com/frpays/lc0-js

chess visualized

https://ebemunk.com/chess-dataviz/

ServiceWorker

https://stackoverflow.com/questions/34160509/options-for-testing-service-workers-via-http | localhost

package.json

dev
        "google-fonts-webpack-plugin": "^0.4.4",

Flems

oninit: dom, m.render timer
https://flems.io/#0=N4IgZglgNgpgziAXAbVAOwIYFsZJAOgAsAXLKEAGhAGMB7NYmBvEAXwvW10QICsEqdBk2J4hcYgAIAysQzEArnABCGAE6SAvJIAUASi0A+ScAA6aSZNhSA+gBNaWLZIVo7MSGhh3zl8VIl5GGczC0tJOldiREkARgpfSVZzRLUYRTULUPDJemo0oJidYAcsVgNNY2ycyXtHZ1LEnLh0gElhNQA3DCgdfSMTJprAxnxIhmcRmDHaKMkAajiAbiGcgHo1rHw0uzUMAHd9FbCayS20txg1HTqsCkkAAwASYCmZqNZJYggcOEl5SQvHRefaSAAiQX0enwxFoABlaNQejAACo-GCyNQQNAAc30rAeelWSXusQADBS9MdLOxJENOhAYPsihVjFgdAByOwQTocolhVjHQUpND+STtAAOCmIyloAA9nP1KoMwmKpiF6T0FDAYhyABIwKBQWiSfa0NRQOwchIC1LpBSZFU5BlMlkDdkc7FS4jIYgATwlME0jDlxAAutaTHSTuFulBtTE3nHtTbTvQvdKip1WZIk1rgtpOjD1Dj0vhkzBU+FyolkmhhWhzGKAAoYUuKnPFSQu5m6HPIdmS6WyuV6e7s2TyJSqNR6MPlY7mLZYWYMHQOagKHAMfAAI1odj991bpaplBALVg1G+9AQPFiiAATABaB+Px9sDggTA4PBjOACDQ9CMMwPBsGGVBQNiADWd6oN+XB4FgEDEIQWLkFQDrkDwJDEBKcCIBsrgStBOIzFgmwoWh0AAAKxPg9EAGyUah6H4Pw57+oGeBwPkEASqIrDzkAA

markdown in innerHTML
https://flems.io/#0=N4IgzgpgNhDGAuEAmIBcJYFczwPYFsBaaCfCAO3jADoArMEAGnFgCdcoo0BtABkd4BdZgDMAljAapuocgEMyaDNjxESZSjXpMMuShXhKsOAgFEYGqtSQRx5CAAoA5PgCehY6uIWDTxgAJYKDkwMH8IAA9EciQwgAkAFQBZABlzUgN-YAAdcn9AvXsEZABhOU4AIzlYAGsHAEocvPyC8hx-MFZYfwBef3gACzEaAHMIeABBeHhWMQrMRGdO2Cd63Jb-dZb8alYKG1YHQeHqOWnqgYBlAbkkXAB3B2B8XBtUfydcAAcKJwBfeoBbhbDb4ZwDABMfn8AAMAJIufxyQIqAjhHyUGGAkEtHH5MFOL7QpwABRgIQg-jsSH8FWgDyReTE+DkY389wGuEgHVwmC6lOGH0YeO2zjk0KaGyl-gGexE72Wwua0r+SulG2WIvy2OVLR10oJzJGEuWAJxgjWzT+uQBOkgMAQYj0UhAAEYAOyoCEgVWyBQQJR0BjMWB6aKGdB3LCWagVV6uahicj2ViJVK9fws1g1ZAOGFbADE-ji0CguC2WwAVP44f4ywA3SlJOTZu73chVmvwJxhUPkRvkMQGTsTGL9CCsSAV5pbUc0ysiGAROYwat4XAAQmn+QAPF89h14K4YD1siAcVVaiN2JgYu8CwAWJ8Abk2utDZdY95EP9fOK+txIEmIzvK6pB-rqWYjEmoGkLwz4ViAAB8OJwvASKcA88TJCkW7NDuAD0+4QChM7NAkAwTrYuB7AE0EDkitLsPckCsAEYjoeUYC4BhZYsSiJj4OiGSaHh+RbDubgeKiagYuhyw9AM0xfGAqAEQR+AcbKEhBtQNEjARZYjLg1BgPWIz+ARpFYnaJCOs6Sgel6PrCCAUBJjUUgyCA8iKOgWY5kgAACwSIDgOh8lw6BKfAKlqQRt5fDUIzUKG+AaS2gUhWcEDhcwR4-EoYBsGIXyGL6Pn+kommDLMXDMJFSgxXF6mJclqUEBpWl1UFELULw1APl1tU6Zp5BBjoBUBugxWzGVLl-EAA

More Packages

I18N: https://github.com/koala-interactive/frenchkiss.js
MD:   https://github.com/StephanHoyer/micromarkdown.js

Game Collections

https://chessentials.com/chess-pgn-downloads/
https://chessproblem.my-free-games.com/chess/games/Download-PGN.php
https://pgnchessbook.org/pgn/
http://www.pgnmentor.com/files.html

Routes

Menu

Games, Game, Analyzer, Logs, Cfg, State, DB, Options, Source, Live

Games (default)

routes: /games/:api [chess.com|lichess.org]/:user
init:
    left:  games list
    cent:  board empty
    right: empty options?

Game

routes: /game/:pgn
init:
    left:  moves list
    cent:  last pos
    right: empty options?

Play

routes: /play/:type [eve|hve|evh]
init:
    left:  moves list
    cent:  current pos
    right: empty options?

Analyzer

routes: /analyzer/:fen
init:
    left:  short moves list, engine proposals
    cent:  current fen
    right: empty options?

State

routes: /state/:what [cfg, db, state, all]

APIs

https://www.chess.com/news/view/published-data-api#pubapi-endpoint-games-pgn
https://api.chess.com/pub/player/noiv/games/2020/04/pgn

https://lichess.org/api#operation/apiUserCurrentGame
https://lichess.org/api/games/user/noiv

Game States

Analyze | Game

game

Game.init()
    State.clear(logs, messages, moves)
    Game.set(black|white, fen, time, players)

Message Protocol

sources: chess, board, engine, window
targets: same

move    =>  fen
fen     =>  bestmove
            availmoves + next step
candidate =>
undo    =>
redo    =>
drop piece
remove piece
rotate
reset
mate detected
end detected
check detected

format: {source: '', targets: '', subject: '', params: [], }

Chess / UCI

UCI Grammar

    https://github.com/vampirc/vampirc-uci/blob/master/res/uci.pest

Worker Loader

https://github.com/webpack-contrib/worker-loader

Examples (Tabs, Tooltips, SVG, Streams)

https://mithril-examples.firebaseapp.com/

Realtime QA

https://gitter.im/mithriljs/mithril.js

Keep Apect Ratio

https://stackoverflow.com/questions/1495407/maintain-the-aspect-ratio-of-a-div-with-css

Speed up Redraw

https://github.com/isiahmeadows/mithril-helpers/blob/master/docs/redraw.md

Helpers & Extensions

https://github.com/MithrilJS/mithril.js/wiki/

Fonts

https://fonts.google.com/?category=Monospace

Router

https://github.com/zyrolasting/mithril-dispatch/blob/master/index.js
https://sagegerard.com/mithril-router-cleanup.html

Link Component

    import m from "mithril";

    const Link = {
        view : (vnode) =>
            m("a", {
                ...vnode.attrs,
                oncreate: m.route.link
            }, vnode.children)
    }

    export default Link

Some Wisdom

```
If you're using m.render, note that this method is relatively low-level and does not hook into the autoredrawing system that mithril provides: https://mithril.js.org/render.html#differences-from-other-api-methods -- you might want to use m.mount or m.route instead. If model changes are stored, m.render should update the DOM accordingly, however.
```

make clean gh-pages branch

cd /path/to/repo-name git symbolic-ref HEAD refs/heads/gh-pages rm .git/index git clean -fdx echo "My GitHub Page" > stuff.txt git add . git commit -a -m "First pages commit" git push origin gh-pages

Then grab the needed file

git checkout gh-pages rm stuff.txt git checkout master -- .gitignore git checkout master -- dist/ git add . git commit -m "dist" && git push

routine

npm run-script build git add . && git commit -m "dist" && git push git checkout gh-pages && git checkout master -- dist git add . && git commit -m "dist" && git push git checkout master

enjoy

https://agentx-cgn.github.io/caissa/dist/#!/analyzer

As for the UCI way to "get all possible moves", you need to set the "multiPV" parameter to some large value (99?), causing the engine to calculate and report a value for every possible move.

Enable multipv on the engine. When you are at "e2e4 e7e5 d2d4" it will list all possible best moves that the engine considers in order of their evaluation. If you find "g7g6" in this list, then what you have considered is one of the best moves also considered by the engine and you'll obviously have the score associated with "g7g6". So, you will find this information before you make the move "g7g6".

position startpos go depth 10

Because Black is to move, and for Black the position is evaluated as being 42.76 pawns behind.

A cp-score of 6000 does indeed mean the engine thinks White is 60 pawns (centi means 1/100) = between 6 and 7 queens ahead. Because it wasn't able to find a forced mate, it will just try to get the highest possible point advantage, knowing that this will bring the game closer to mate. In practice, a score of (+/-)150 is already decisive most of the times.

https://github.com/rpdelaney-archive/python-chess-annotator/blob/master/annotator/__main__.py