Spielerando

Players found a trade loop that turns ten wood into twelve and I need to find all of them

With several goods and several traders, a profitable loop can hide in three or four steps that each look fair. This entry gives your AI a check that finds such loops in your exchange rates and prints the loop with its profit.

Why this works

Going around a loop of exchanges multiplies the rates. If the product is above 1, every lap makes goods from nothing. Taking the logarithm turns the product into a sum, and a loop with a negative total of costs is found by a standard shortest-path search.

When not to use it

Skip it for markets where prices move with supply and demand. The loop then closes by itself as players use it; test with the real price curve instead of fixed rates.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 41 lines of example code with 4 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Players found a trade loop that turns ten wood into twelve and I need to find all of them" (read_entry strategy-trade-loop-prints-money) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP