spacetraders-v1 v0.21
Trade route optimization
Replaced the old determineCargo algorithm with a new determineBestTradeRoute module. Instead of just picking what to buy at the current location, it now evaluates all possible routes to find the most profitable trade considering travel distance, fuel costs, and market prices at both ends.
Added a dynamic debugging system with debugStates that can be toggled at runtime. Ship machines now log state transitions and context changes when debug mode is enabled, making it much easier to trace issues in the trading logic.
Refactored travelToLocationMachine and extracted common travel logic into a travelToLocation helper. Also created initShipMachine to standardize ship machine initialization across strategies.
Fixed a bug with fuel overage calculations that was causing ships to buy more fuel than needed. Various probe fixes to handle edge cases when all locations have been recently scouted.
More spacetraders-v1
My first implementation against the spacetraders api is an entirely browser-based UI and automation tool · source · play spacetraders-v1 · devlog · spacetraders api · posts