frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: I modeled the puzzle game Railbound with Constraint Programming

https://github.com/Th1nhNg0/railbound_cp
2•th1nhng0•2h ago
Hi HN, I've been working on a solver for the puzzle game Railbound and wanted to share it.

The backstory is that I'm a big fan of the game and was curious if I could model its logic using constraint programming. I used MiniZinc to build it. The project treats each puzzle as a constraint satisfaction problem—it defines the rules of the game (how tracks connect, how switches work, etc.) and then searches for a layout that solves the level.

It's different from other solvers because it's a declarative model rather than an imperative search algorithm. It was a fun challenge to translate mechanics like timed gates, dynamic switches, and decoy cars into formal constraints.

You can run it on your own machine. The repo has instructions, but the basics are: 1. Install the MiniZinc IDE/toolchain. 2. Clone the repo. 3. Run a command like minizinc --solver or-tools main.mzn data/1/1-1.dzn

The project is open source and currently solves the first 8 worlds of the game.

Repo: https://github.com/Th1nhNg0/railbound_cp

I'm here to answer any questions. I'd love to hear your feedback.

Comments

mzl•1h ago
Very nice project. Do you have some statistics for how long it takes to solve the harder instances for different solvers? One thing to note for that, is that I saw the default parallelism of 4 in the run file. OR-Tools CP-SAT works best if it is given at least 8 threads to work with.

Have you considered using records for some of the data definitions? For example, a record `(row: int, col: int, piece: Piece)` for pre-placed pieces to avoid having .1, .2 and so on in the models. If you are concerned with the size of the data files, one way to handle that is to have the data as a list of tuples that are mapped via a function from a tulle to the record.

th1nhng0•36m ago
Thanks for the great feedback! I didn't know OR-Tools CP-SAT worked best with at least 8 threads; I'll definitely try that out.

In my local tests, Chuffed is often faster on the simpler instances. However, I've noticed on the harder puzzles, Chuffed can take over 10 minutes, while OR-Tools (with just 4 threads) solves them in about 5.

You're also right about the records. I started with tuples for simplicity, but as the model grew more complex, it's clear that records would be a much better approach for readability.

Gravestone recipes provide unique way for Midwesterners to be remembered

https://www.wpr.org/news/gravestone-recipes-cookbook-rosie-grant
1•gscott•59s ago•0 comments

Show HN: Electron but for Java 21

https://twitter.com/SunnyKentz/status/1978332963096944775
1•sunnykentz•4m ago•0 comments

The Ultimate LOA Checklist for Amazon Sellers

https://bemyreseller.com/blog/amazon-loa-checklist
1•erayalakese•9m ago•0 comments

React Compiler

https://react.dev/learn/react-compiler
1•m3h•11m ago•0 comments

Show HN: AutoDev: Automated AI Development at Scale

https://blog.delino.io/2025-10-15-introducing-autodev
4•kdy1•14m ago•0 comments

EU Considers Forced Tech Transfers for Chinese Investments

https://finance.yahoo.com/news/eu-considers-forced-tech-transfers-141455310.html
1•piskov•17m ago•1 comments

.NET Security Feature Bypass Vulnerability

https://github.com/dotnet/aspnetcore/security/advisories/GHSA-5rrx-jjjq-q2r5
2•alexis2b•18m ago•0 comments

Meta News on Lix

https://lix.systems/blog/2025-10-13-meta-lix-news/
1•signa11•21m ago•0 comments

Project Pele: DoD's breakthrough moment for nuclear power

https://warontherocks.com/2025/04/the-department-of-defenses-breakthrough-nuclear-moment-risks-sl...
1•gsf_emergency_4•23m ago•0 comments

Trump Targets Democratic Districts by Halting Billions During Shutdown

https://www.nytimes.com/interactive/2025/10/14/us/trump-grants-democrat-districts-government-shut...
1•mitchbob•25m ago•1 comments

Top-Down Microarchitecture Analysis Method

https://www.intel.com/content/www/us/en/docs/vtune-profiler/cookbook/2025-4/top-down-microarchite...
2•gnyeki•26m ago•0 comments

Facebook suspends Chicago ICE-sightings group at Trump administration's request

https://chicago.suntimes.com/immigration/2025/10/14/facebook-suspends-popular-ice-sightings-group...
4•perihelions•29m ago•1 comments

Recreated Rewind in a Weekend

https://newbry.bearblog.dev/recreated-rewind-in-a-long-weekend/
1•joenewbry•29m ago•0 comments

Kernel Developer Career in 2025

3•-1•30m ago•0 comments

I am a programmer, not a rubber-stamp that approves Copilot generated code

https://prahladyeri.github.io/blog/2025/10/i-am-a-programmer.html
3•pyeri•31m ago•0 comments

Subspace-Accelerated Coordinate Descent for Physics-Based Simulation

https://arxiv.org/abs/2510.12053
1•E-Reverance•32m ago•0 comments

ChatGPT will support erotica later this year for verified adults

https://www.forbes.com/sites/tylerroush/2025/10/14/chatgpt-will-allow-erotica-after-easing-mental...
2•MaxMonteil•33m ago•0 comments

Only reactor incident in the US with immediate fatalities

https://en.wikipedia.org/wiki/SL-1
1•gsf_emergency_4•36m ago•0 comments

Official Svelte MCP Server

https://github.com/sveltejs/mcp
1•wiradikusuma•43m ago•0 comments

Bambulab P2S

https://bambulab.com/en/p2s
1•vaultdweller101•45m ago•0 comments

Shader Pilot – fly through a 3D world created with a tiny shader

https://gemini-shader-pilot-553076154375.us-west1.run.app/
2•memalign•48m ago•1 comments

Show HN: PR comments for Claude Code diffs (open-source)

https://github.com/fliellerjulian/claude-code-feedback
3•fliellerjulian•51m ago•0 comments

YouTube to have Liquid Glass like UI

https://twitter.com/FrostKiwiOne/status/1978319599033864583
1•FrostKiwi•58m ago•1 comments

Argentina's AI Opportunity

https://openai.com/global-affairs/argentinas-ai-opportunity/
1•kanemontreuil•59m ago•0 comments

Joshua Kushner, Thrive Capital, and the American Dream

https://joincolossus.com/article/joshua-kushner-thrive-new-world/
2•saoh•1h ago•0 comments

Show HN: a deterministic chess variant with cheat resistance and tons of variety

https://www.argonchess.com/
2•spenvo•1h ago•0 comments

Old Is Gold: Optimizing Single-Threaded Applications with Exgen-Malloc

https://arxiv.org/abs/2510.10219
1•todsacerdoti•1h ago•0 comments

KuzuDB says so long and thanks for all the commits, marooning community

https://www.theregister.com/2025/10/14/kuzudb_abandoned/
1•damethos•1h ago•1 comments

We built WealthAI – A Personal Finance Suite that lets you track and grow your

https://www.sideprojectors.com/project/67099/wealthai
2•asaws•1h ago•2 comments

Aussie fossils preserved in ferricrete show soft tissue cell structures

https://www.sciencealert.com/strange-red-rocks-in-australia-are-preserving-fossils-in-stunning-de...
1•Gaishan•1h ago•0 comments