sunfish
Pyjion
Our great sponsors
sunfish | Pyjion | |
---|---|---|
12 | 23 | |
2,885 | 1,407 | |
- | - | |
2.5 | 5.0 | |
3 months ago | 27 days ago | |
Python | C++ | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
sunfish
-
funAndEasyToUse
The NNUE version does but the non-NNUE version doesn't use numpy. That numpy import is for a neural network based evaluation functions. The base engine still plays at a strong human level and doesn't use numpy to do any of the heavy lifting. It does rely on itertools and collections though.
-
Python is slow, garbage language!
I'm currently working on a chess bot in C++. The literature and common sense tells you that faster is better, which was my main reason for choosing C++. Then I discovered Sunfish on GitHub that in around 400 lines of Python (without any low level libraries like ctypes) and it still beat me somewhat convincingly. It was definitely fast enough.
-
Easy to read chess engine source code
Just one file: Sunfish.py
-
This Week In Python
sunfish – A Python Chess Engine in 111 lines of code
- Sunfish is a simple, but strong chess engine, written in Python
-
Looking for mod friendly python chess program.
https://github.com/thomasahle/sunfish sunfish is a pretty simple one that uses piece square tables for evaluating positions. Wouldn’t be too difficult to change or even tune
-
sunfish VS Synergy-Chess - a user suggested alternative
2 projects | 17 Jun 2022
-
Look what I found here. I used to play with it a lot because I have no friends. Do you guys have something similar?
It's from 1990. My father passed it down to me. It works... Uhmm.. idk. There's a proprietary chess engine built in. It says it's around 1700 elo points strong. I am a big noob when it comes to chess engines but if you're interested in learning you can check out sunfish , but (Python) programming skills are required.
-
The Kilobyte's Gambit: Can you beat 1024 bytes of JavaScript [at chess]?
Incomprehensible scheiße code. I looked around and I like this one because it has "meta-level" definition of movements and liitle bit of strategy. You could implement context-free chess games with varying rules for us congenitally lazy and dull-witted. https://github.com/thomasahle/sunfish/blob/master/sunfish.py
-
Can you defeat a chess engine written in 1KB of Javascript?
sunfish https://github.com/thomasahle/sunfish (sunfish is the most compact and still understandable code in my opinion)
Pyjion
-
Python 3.13 Gets a JIT
It exists, was created by microsoft employees, and is referenced in the article: https://www.trypyjion.com/
-
Is anyone using PyPy for real work?
I've actually come across and started using Pyjion recently (https://github.com/tonybaloney/pyjion); how does Pypy compare, both in terms of performance and purpose? There seems to be a lot of overlap...
-
funAndEasyToUse
Python is capable of doing things at runtime that are really hard to statically compile around, such as monkeypatching methods onto existing objects. You can compile it, but it's complicated. One strategy is to use a JIT that can observe application state at runtime and then invalidate code as it becomes obsoleted by changes, but it's complicated. See pyjion for an example.
-
Javascript has Typescript. WHY WE DONT HAVE TYPY !
When I say "Python" I am referring to the standard CPython interpreter which most people use. But there is also PyPy, which includes a Just In Time compile that compiles selected code into machine language on the fly, as needed. pyjion is another JIT compiler that generates machine language on the fly, and you can install it with pip. Or you could work for Facebook and use Cinder. Cython, Nuitka and Pyston are other alternatives.
-
How is Golang websocket better than FastAPI websocket?
and if you need more speed you can try https://www.pypy.org/ or https://github.com/tonybaloney/Pyjion or https://www.pyston.org/
-
CPython vs PyPy
Finally, there is also Pyjion which based on its website is “A drop-in JIT Compiler for Python 3.10” (https://www.trypyjion.com/). We will be covering it on a separate writeup. See you next time ;-).
- Accelerate Python code 100x by import taichi as ti
- Create CPython extensions in .NET?
-
Instant upvotes
Though some exciting stuff happening over the next few years, Python is getting faster, has been for awhile, and stuff like Pyjion https://www.trypyjion.com/, a drop in C# powered JIT compiler is starting to approach usable. Rust and Python seem to be best buds right now, so more extension libraries in rust, a newer more approachable language than say C/C++ but with a similar speed. Sign me up!
-
You think python is slow ?
Pyjion Easy to use, small compiler. Increase performance of our 🐌 CPython.
What are some alternatives?
stockfish - Integrates the Stockfish chess engine with Python
Numba - NumPy aware dynamic Python compiler using LLVM
Auto-Chess - A chess bot that automatically calculates the best moves and plays them for you
Nuitka - Nuitka is a Python compiler written in Python. It's fully compatible with Python 2.6, 2.7, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11. You feed it your Python app, it does a lot of clever things, and spits out an executable or extension module.
Synergy-Chess - system that allows you to simultaneously start 8 chess engines and obtain a single move through the majority criteria and of score.
cinder - Cinder is Meta's internal performance-oriented production version of CPython.
nanochess - Deobfuscation of the Toledo Javascript Chess
graalpython - A Python 3 implementation built on GraalVM
Play-online-chess-with-real-chess-board - Program that enables you to play online chess using real chess boards.
Cython - The most widely used Python to C compiler
bootOS - bootOS is a monolithic operating system in 512 bytes of x86 machine code.
hpy - HPy: a better API for Python