frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB

https://github.com/datavorous/sameshi
67•datavorous_•2h ago•25 comments

Show HN: I spent 3 years reverse-engineering a 40 yo stock market sim from 1986

https://www.wallstreetraider.com/story.html
553•benstopics•4d ago•184 comments

Show HN: SQL-tap – Real-time SQL traffic viewer for PostgreSQL and MySQL

https://github.com/mickamy/sql-tap
182•mickamy•11h ago•29 comments

Show HN: Markdown Prism – A Non-Electron Markdown Editor for macOS

https://prism.huconn.xyz
3•hulryung•58m ago•0 comments

Show HN: Data Engineering Book – An open source, community-driven guide

https://github.com/datascale-ai/data_engineering_book/blob/main/README_en.md
205•xx123122•18h ago•24 comments

Show HN: Terminalcore – The Rhythm Game for PC

https://terminalcore.vercel.app/
2•Kejii_2770•1h ago•0 comments

Show HN: A small embeddable Datalog engine in Zig

3•habedi0•2h ago•0 comments

Show HN: I'm 75, Building an OSS Virtual Protest Protocol

https://github.com/voice-of-japan/Virtual-Protest-Protocol/blob/main/README.md
5•sakanakana00•2h ago•0 comments

Show HN: Prompt to Planet, generate procedural 3D planets from text

https://prompttoplanet.n4ze3m.com/
8•error404x•8h ago•9 comments

Show HN: Skill that lets Claude Code/Codex spin up VMs and GPUs

https://cloudrouter.dev/
127•austinwang115•21h ago•34 comments

Show HN: ClipPath – Paste screenshots as file paths in your terminal

https://github.com/BiteCraft/ClipPath
14•viniciusborgeis•15h ago•0 comments

Show HN: Moltis – AI assistant with memory, tools, and self-extending skills

https://www.moltis.org
111•fabienpenso•1d ago•42 comments

Show HN: OpenWhisper – free, local, and private voice-to-text macOS app

https://github.com/richardwu/openwhisper
32•rwu1997•21h ago•11 comments

Show HN: Geo Racers – Race from London to Tokyo on a single bus pass

https://geo-racers.com/
139•pattle•2d ago•86 comments

Show HN: MicroVibe – minimal JSX web starter

https://github.com/melendezgg/microvibe
4•melendezgg•11h ago•1 comments

Show HN: AI agents play SimCity through a REST API

https://hallucinatingsplines.com
216•aed•5d ago•72 comments

Show HN: Lucid – Catch hallucinations in AI-generated code before they ship

https://github.com/gtsbahamas/hallucination-reversing-system
4•jordanappsite•11h ago•0 comments

Show HN: Sol LeWitt-style instruction-based drawings in the browser

https://intervolz.com/sollewitt/
69•intervolz•3d ago•14 comments

Show HN: Musecl-memory – Zero-dependency memory sync for AI agents bash and Git

https://github.com/musecl/musecl-memory
3•musecl•11h ago•0 comments

Show HN: Verify-before-release x402 gateway for AI agent transactions

2•settlddotwork•11h ago•0 comments

Show HN: Rowboat – AI coworker that turns your work into a knowledge graph (OSS)

https://github.com/rowboatlabs/rowboat
204•segmenta•3d ago•56 comments

Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents

https://github.com/JaredStewart/coderlm/blob/main/server/REPL_to_API.md
79•jared_stewart•3d ago•37 comments

Show HN: I built a macOS tool for network engineers – it's called NetViews

https://www.netviews.app
242•n1sni•4d ago•60 comments

Show HN: Skybolt Reflect – C++ header-only runtime reflection library

https://github.com/Prograda/skybolt-reflect
2•matt128•14h ago•0 comments

Show HN: Agent Alcove – Claude, GPT, and Gemini debate across forums

https://agentalcove.ai
64•nickvec•2d ago•26 comments

Show HN: Distr 2.0 – A year of learning how to ship to customer environments

https://github.com/distr-sh/distr
100•louis_w_gk•4d ago•29 comments

Show HN: Turn OpenClaw in a high performing development team with DevClaw

https://github.com/laurentenhoor/devclaw
4•laurentenhoor•15h ago•1 comments

Show HN: Pgclaw – A "Clawdbot" in every row with 400 lines of Postgres SQL

https://github.com/calebwin/pgclaw
46•calebhwin•1d ago•33 comments

Show HN: 20+ Claude Code agents coordinating on real work (open source)

https://github.com/mutable-state-inc/lean-collab
50•austinbaggio•1d ago•38 comments

Show HN: JavaScript-first, open-source WYSIWYG DOCX editor

https://github.com/eigenpal/docx-js-editor
129•thisisjedr•4d ago•44 comments
Open in hackernews

Show HN: Sameshi – a ~1200 Elo chess engine that fits within 2KB

https://github.com/datavorous/sameshi
60•datavorous_•2h ago
I made a chess engine today, and made it fit within 2KB. I used a variant of MinMax called Negamax, with alpha beta pruning. For the board representation I have used a 120-cell "mailbox". I managed to squeeze in checkmate/stalemate in there, after trimming out some edge cases.

I am a great fan of demoscene (computer art subculture) since middle school, and hence it was a ritual i had to perform.

For estimating the Elo, I measured 240 automated games against Stockfish Elo levels (1320 to 1600) under fixed depth-5 and some constrained rules, using equal color distribution.

Then converted pooled win/draw/loss scores to Elo through some standard logistic formula with binomial 95% confidence interval.

Comments

chvid•2h ago
Cool that you could keep it under 2k but it would nice to have a readable version of the source code.

Do you work with it like this or do you have some sort of script you apply to get it down to a single line, single letter variable names?

noutella•1h ago
What you’re describing is the typical output / function of a minifier
alansaber•1h ago
The real fun would be reverse-engineering the minified code (there are loads of tools to do this for chrome extensions)
TZubiri•1h ago
not lossless
GeertB•1h ago
How did you handle games where Stockfish would castle or promote?
datavorous_•1h ago
i forced stockfish to play only non castling, non en passant, non promotion moves by filtering legal moves and passing only those as root_moves

also removed castling/EP rights from FEN

lekevicius•1h ago
Do you think it would be possible to achieve 1:1 ELO:bytes? Even smaller, but can be less smart.
datavorous_•1h ago
maybe for very low ratings it's plausible? 1 elo per byte might happen in a tiny range but at a useful strength it would break fast, that's what i think
iterance•11m ago
What's the snallest possible program that accepts a chess board state and prints any legal move? True randomness may only have a couple hundred ELO, but then, that's pretty big for golf
esafak•10m ago
That's an awesome code golf challenge
TZubiri•1h ago
Codex or Claude Code?
datavorous_•1h ago
none.

scribbling long enough on a piece of paper is more enjoyable than prompting.

semi-extrinsic•19m ago
a thousand times this.
haute_cuisine•1h ago
This is amazing! Thanks for sharing. What would be the elo gain for 4KB engine?

P.S. I assume 1200 elo in chess com scale (not lichess / fide elo) and bullet chess variant?

grumpopotamus•1h ago
There is a TCEC category for 4k engines. The top ones are ~3000 Elo.
sigmoid10•44m ago
It's wild to think that 4096 bytes are sufficient to play chess on a level beyond anything humans ever achieved. Makes you think what other difficult tasks are out there that take even highly gifted humans years or decades to master, but a superior algorithm would more or less fit into one of those big QR code formats.

These things always make me think back to Westworld season 2, where the finale revealed that human minds are much simpler than they themselves believe and fit completely into an algorithm that could be printed in an average book.

kevmo314•39m ago
The core search algorithm is very simple though. 4KB engines may not run that fast if they do exhaustive search, but they’ll be quite accurate.

According to TCEC the time control is 30 mins + 3 sec, that’s a lot of compute!

sigmoid10•26m ago
If you look at the current winner [1], it does a lot more than just brute force tree search. The space state for chess is simply too big to cover without good heuristics. Deep Blue may have been a pure brute force approach to beat Kasparov after Deep Thought failed using the same core algorithm, but modern chess engines search far deeper on the tree with far fewer nodes than Deep Blue ever could thanks to better heuristics.

[1] https://github.com/MinusKelvin/ice4

kevmo314•11m ago
I'm not suggesting that it's only brute force tree search, just that it's not very complicated to develop a theoretically perfect chess engine in direct response to the parent

> It's wild to think that 4096 bytes are sufficient to play chess on a level beyond anything humans ever achieved.

vunderba•32m ago
Well, one of the most fundamental algorithms for building a chess AI is minimax [1] (or variants like negamax), and that’s been around for close to a century. The key difference is that as compute power and available RAM have grown, it’s become possible to search much deeper and evaluate far more plies.

So while 4k is still very impressive for the code base, it comes with a significantly larger runtime footprint.

[1] - https://en.wikipedia.org/wiki/Minimax

falsaberN1•48m ago
Oh my god the source is so tiny! It's really hard to parse because of it being minified but I love it to bits.
burstw0w•43m ago
Good job! I love how you obfuscated your code, really in a spirit of FOSS!
y-curious•36m ago
Coworker: “hey if you have a second, I have a one-liner PR open”

The PR:

datavorous_•36m ago
Oh well, the file initially looked like https://github.com/datavorous/sameshi/blob/7ab4e47144f96becd...

It is hideous now!

tromp•12m ago
https://www.chessprogramming.org/Toledo is a family a moderately strong tiny chess programs.