strryke / betafish Goto Github PK
View Code? Open in Web Editor NEWA chess engine and AI move finder written in Javascript. Beats Stockfish level 6 on Lichess.
Home Page: https://betafish.gavinong.com
License: MIT License
A chess engine and AI move finder written in Javascript. Beats Stockfish level 6 on Lichess.
Home Page: https://betafish.gavinong.com
License: MIT License
npm i betafish
doesn't work, how can i use it in my project
Thanks for this cool project!
Hi Gavin,
Thanks so much for developing this tiny but powerful engine.
I have been enjoying using it, however, today I noticed that the engine calculates the next move of the below position very much incorrectly.
Position: 2k4r/2p1bpp1/p7/1p2n2b/3pPP2/P2P3q/1PP4N/R3QRK1 b - f3 0 24
I checked it with the two engines below and they didn't suggest that move even with the lowest rating (1300):
I also maxed "thinking time", but got the same result.
I am not sure if you answer this type of question, but thought I ask anyway since it looks like a bug.
Appreciated!
Fantastic work!
An idea popped up while testing it. How about organizing browser chess chanmpionship. Instead of chess engines, it is browsers competing with the same chess engine (betafish). The reason it would work is mainstream browsers (Chrome/Firefox/Safari) have different implementations of javascript engine which would produce a difference in performance with a fixed time allotment (say 1s).
That way we could get Browser Elo!
Issue: Upon calling game.makeAIMove
on a game with FEN of rrrrkrrr/rrrRrrrr/8/8/8/8/RRR1RRRR/RRRRKRRR b Qq - 0 0
It results in the variable bestMove
to be 0 in the function. You can test this on the betafish.js website where after you set the FEN when you click "AI Move" nothing happens and no pieces are moved.
After digging, I found that the early return was due to the time being exceeded in the CheckUp
function. However I still don't know how to resolve this problem, and for the FEN above, increasing the time to 200s didn't resolve the problem
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.