tobymao / 18xx

A platform for playing 18xx games online!
https://18xx.games
Other
285 stars 186 forks source link

[1846] New autorouting seems to give lesser results #6887

Closed damerell closed 2 years ago

damerell commented 2 years ago

https://18xx.games/game/68356 is a concluded game where the PRR was autorouted for $830 in its last OR. When I saw on the front page that the autorouting was faster, I decided to see if it could do better; to my surprise it gets $790 - using Firefox, but on two different computers.

I notice a bunch of "Node timeout reached" in the browser console. I wonder if this is related?

tobymao commented 2 years ago

@JoeB989 for tracking

JoeB989 commented 2 years ago

Yes, I made a tradeoff of node timeout vs path timeout. Some scenarios got better with more complete routes; apparently your scenario got worse. I'll be working on more speedups so you'll eventually see fewer timeouts overall.

damerell commented 2 years ago

That would be lovely. IDK if I should open another issue, but it would also be useful in general to be able to vary the timeouts. In an async game, I don't care if it takes 5 minutes; and presently a player on a fast computer gets an unfair advantage over one on a tablet.

JoeB989 commented 2 years ago

I'll add timeout fields to the Tools page, look for it soon.

JoeB989 commented 2 years ago

I can't download this game to test it (the download is truncated). In a day or so the main site should have timeout fields on the Tools page so you can retry this with a longer path timeout. Make it as large as you need to to eliminate "node timeout" messages, and hopefully you will get maximal auto-routes.

The main bug, auto-routing is too slow to give optimal routes, will take longer to fix.

perwestling commented 2 years ago

Optimal routes might not be worth aiming for. Good enough should be enough.

scottredracecar commented 2 years ago

I cloned the game and used a long timeout and auto found the 830 here so I think this is fixed now (but it might be slow on slow hardware with this complicated routing).

Closing, but someone else can double check if they would like.