{"id":13516867,"url":"https://github.com/Strryke/betafish","last_synced_at":"2025-03-31T07:30:36.760Z","repository":{"id":53207414,"uuid":"520050752","full_name":"Strryke/betafish","owner":"Strryke","description":"A chess engine and AI move finder written in Javascript. Beats Stockfish level 6 on Lichess.","archived":false,"fork":false,"pushed_at":"2023-06-08T06:04:25.000Z","size":1660,"stargazers_count":95,"open_issues_count":2,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2024-11-01T21:35:43.138Z","etag":null,"topics":["chess","chess-ai","chess-engine","javascript","minimax"],"latest_commit_sha":null,"homepage":"https://betafish.gavinong.com","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Strryke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-08-01T09:45:06.000Z","updated_at":"2024-10-19T14:59:09.000Z","dependencies_parsed_at":"2024-03-29T06:33:13.511Z","dependency_job_id":"5f5da2fa-c663-49fb-8e5f-4876a48e1cb7","html_url":"https://github.com/Strryke/betafish","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strryke%2Fbetafish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strryke%2Fbetafish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strryke%2Fbetafish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Strryke%2Fbetafish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Strryke","download_url":"https://codeload.github.com/Strryke/betafish/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246432855,"owners_count":20776474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","chess-ai","chess-engine","javascript","minimax"],"created_at":"2024-08-01T05:01:26.683Z","updated_at":"2025-03-31T07:30:36.065Z","avatar_url":"https://github.com/Strryke.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Betafish\n\n\u003cimg src=\"cover.png\" alt=\"Betafish\" width=\"300\"/\u003e\n\nBetafish - An amalgamation of AlphaZero and Stockfish.\n\nPlay it [here](https://betafish.gavinong.com).\n\n[Read more about it on my blog.](https://gavinong.com/projects/betafish)\n\n## Introduction\n\nBetafish is a chess engine and AI move finder written in Javascript, based on the Negamax algorithm. It beats Stockfish Level 6 on Lichess, and I estimate its around 1800-2000 Elo, depending on the thinking time afforded.\n\n## Features\n\n- Negamax algorithm with alpha-beta pruning\n- Move ordering using the MVV-LVA heuristic\n- Principal variation search\n- Quiescence search\n- Iterative deepening\n- Piece-square tables\n- Tapered evaluation\n\nThis enables Betafish to search to a depth of 7-8 plies and around ~1mil possible nodes, given a thinking time of around 1-2 seconds.\n\n## Possible Improvements\n\n- Transposition tables\n- Zobrist hashing\n- Opening tables\n\nOf course, re-writing this in a compiled language like C++ would be a huge improvement. I wrote it in Javacript as I wanted to deploy it as a web app, as what fun would a game be without letting your friends challenge it? However, I quickly realised the limitations, as JS is definitely not suited for these computing-intensive tasks.\n\n## Changelogs\n- 1.1 - Changed evaluation function from [Simplified Eval](https://www.chessprogramming.org/Simplified_Evaluation_Function) to [PeSTO's Eval Function](https://www.chessprogramming.org/PeSTO%27s_Evaluation_Function). Major improvements ~ 200 elo.\n\n## Credits\n\n- [Chess Engines: A Zero to One](https://www.chessengines.org/) - The article that jumpstarted my journey into chess programming.\n- [WukongJS](https://github.com/maksimKorzh/wukongJS) - A JS chess engine, written by Maksim Korzh, who was patient enough to answer my questions, give me pointers and point me in the right direction in this journey.\n- [Bluefever Software's YouTube series](https://www.youtube.com/watch?v=2eA0bD3wV3Q\u0026list=PLZ1QII7yudbe4gz2gh9BCI6VDA-xafLog) - A 63-part series on chess programming, which was an absolute gold mine and served as inspiration for the bulk of the chess engine.\n- [Chess Programming Wiki](https://www.chessprogramming.org/Main_Page) - A great resource for chess programming.\n- [CM Chessboard](https://github.com/shaack/cm-chessboard) - The library I used for the GUI.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStrryke%2Fbetafish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStrryke%2Fbetafish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStrryke%2Fbetafish/lists"}