Ikabot-Collective / ikabot

A Python-based bot designed for automating tasks in the game Ikariam
https://discord.com/invite/3hyxPRj
MIT License
95 stars 63 forks source link

improve resources transport time by spreading tasks #177

Open Pafestivo opened 11 months ago

Pafestivo commented 11 months ago

Is your feature request related to a problem? Please describe. Right now when you construct a building and need to send more resources, when you pick for example 4 towns to send resources from, the bot will send the full amount from one city, then move to the next, and so on. for example if you have 100 boats and send 400k marble from 4 cities- the boat will send all the 50k from one city instead of spreading it, resulting in long loading times. this will only get worse for example with 300 boats and 400k marble, so it sends 150k marble from one city which can result in over an hour of loading time

Describe the solution you'd like It could be improved by doing this: if you choose to send 400k marble from 4 cities, and have 100 boats - send waves of 12,500 from each city to reduce loading times

susikaman commented 11 months ago

Something like this has been suggested before, mainly the separation of ships to reduce loading time and overall resource moving speed. I've been doing this manually, by first sending batches of ships before activating the function so the bot will take over when the ships come back one by one.

Feel free to find a good solution for this! Maybe something like having an option to select a specific amount of ships that would be used per shipment, to find the ideal amount of ships per transport. Eg. with level 40 trading port, 20k per transport equals to around 2 minutes loading time, which is quite ideal since the random wait time cuts some of the time.

ikagod commented 8 months ago

The issue of transport optimization has been quite well discussed before, but we never made much progress on it. It's a mathematical issue more than a programming one. Given boats, islands, and resources on each island, what is the best way to transport the resources that need to be transported? Keep in mind that you can also send not-full boats that travel somewhat faster, which could in theory allow your port to work for longer and making it more optimal. I think the main issue that should be discussed is what we are optimizing for? (speed, action points, earliest resource deposit...)

I've been looking into using a custom trained AI that will solve this complex issue but I don't have much time to work on it.