Inspiration
I am a retired mathematician, engineer, and software developer, and I created Chess-True as an independent long-term research project.
Chess-True is a long-term chess analysis project that stores and reuses calculated knowledge instead of discarding engine work after each session. While developing it, I became interested in another difficult optimization problem: how to find an efficient processing order when many related tasks have different transition costs.
This led to Route Lab, an interactive environment for experimenting with the Travelling Salesperson Problem (TSP) and exploring algorithms that may also be useful for similar combinatorial optimization problems.
What it does
Route Lab allows users to create a directed cost matrix for 3 to 15 cities. The matrix can be generated automatically or entered manually. Because the costs are directed, travelling from city A to city B may cost something different from travelling from B to A.
The matrix is sent through a WebSocket connection to a separate Chess-True calculation worker. The worker performs an exact route search and sends live progress back to the browser. The interface displays:
- the best route and cost;
- the number of calculations;
- the amount of stored data;
- intermediate route improvements;
- worker and queue status;
- elapsed calculation time.
The calculation runs separately from the web interface, so the page remains responsive while the search is running.
A possible chess application
Route Lab also demonstrates an optimization idea relevant to chess analysis.
Imagine that Chess-True has many related positions to process. Each position can be represented as a node. The computational cost of switching between positions or rebuilding an analysis context can be represented as a directed edge cost.
A TSP-like algorithm can then search for an efficient order in which to process those positions. The current Route Lab is an experimental foundation for studying this and other related scheduling problems.
How I built it
The project combines:
- a responsive HTML, CSS, and JavaScript interface;
- a directed cost-matrix editor;
- WebSocket-based communication;
- a separate calculation worker;
- a compact XML messaging protocol;
- live progress and result visualization;
- integration with the existing Chess-True website.
I developed Route Lab iteratively with Codex and GPT-5.6. Codex helped me inspect and understand the existing codebase, design the interface, connect the browser to the calculation protocol, separate heavy computation from the main process, diagnose integration problems, improve error handling, and document the project.
GPT-5.6 was especially useful as a reasoning partner when translating the mathematical idea into a clear product workflow and evaluating how a TSP-like model could relate to chess-analysis scheduling.
Challenges
The main challenge was not only implementing the algorithm, but integrating it safely into a live distributed system.
The browser needed to distinguish between server connectivity and calculation-worker availability. It also needed to handle job preparation, progress updates, cancellation, completion, and errors without blocking the interface.
Another challenge was communicating a mathematical experiment in a way that is understandable to users. The final interface turns a cost matrix and a remote exact search into visible, continuously updated results.
What I learned
I learned how important it is to separate computational work from user-interface work. Even when matrices are relatively small, a dedicated worker makes the architecture more reliable and keeps the experience responsive.
I also learned that optimization research becomes much easier to explain when users can directly create an instance, run it, and observe improvements live.
Working with Codex showed me how an AI coding agent can contribute across the entire development cycle: architecture, implementation, debugging, user experience, documentation, and presentation.
What's next
The broader goal is to use Route Lab to discover and compare practical algorithms for TSP-like optimization problems.
Future work includes:
- comparing exact and heuristic algorithms;
- supporting larger matrices;
- adding reproducible benchmark datasets;
- visualizing routes and search progress;
- improving job cancellation and request isolation;
- testing chess-position scheduling models;
- applying successful approaches to other optimization tasks.
Route Lab is both a working application and the beginning of a larger algorithmic research direction inside Chess-True.
Built With
- algorithms
- asm
- chess
- codex
- combinatorialoptimization
- css3
- delphi
- distributedcomputing
- gpt-5.6
- html5
- javascript
- node.js
- openai
- travellingsalespersonproblems
- websockets
Log in or sign up for Devpost to join the conversation.