How to Automate Mining Asteroids in EVE Online

Its a standard strategy for trying to avoid gate campers deploying bubbles and smart bombs. Normally a traveler is expected to warp from gate to gate so his trajectory is reasonable foreseeable. Gate campers would often deploy bubbles on this trajectory or wait for a traveler to come out of warp on this trajectory. To avoid the trajectory traps we often warp from the system entry gate to some celestial and then from there to the exit gate. this changes the foreseeable trajectory and adds a bit of a safety margin. If its not a major development task it may be worth while considering.

Thank you for the clarification. I understand it is not related to mining asteroids. To ensure it can be found in spite of that, I added it here: bots/eve-online-players-strategies.md at a272acde3fd79bc834cf6e0f6ef0c41c82419c7d ¡ Viir/bots ¡ GitHub

Today I further expanded the memory reading side; this should cover the remainder of what we need for the bot you described:
https://github.com/Viir/bots/commit/1b93524d8c43bd7a66d3c0cbd09a37eeaccc4534

Along with the productive parsing implementation, this change also adds automated tests, for example, for parsing the distance from overview entries:

This is significantly more complex than I imagined. I hope people appreciate your work and the time you put into it. I certainly do!

Part of this complexity is building a framework that guides bot developers and people who want to customize bots. Up until now, the changes I linked were all on the sensor/reading side, and the framework developed here can be used for other bots too. This framework reduces the effort spent on live testing a bot because it helps detect problems before even starting the bot.

I made another addition on the seeing side of the EVE Online bot framework:
https://github.com/Viir/bots/commit/0c450595663d1aa3d67e673e579d3dc4c4fae1c6

This addition will make the ‘lock target’ part of the mining bot more robust, as it enables the bot to see and count the number of locked targets.

sound pretty good. whatever I can do to help in any way, feel free to let me know.

Thank you, live testing is an area where you could help. (Live testing is the kind of testing which includes running the game client.) I will post here when the first version of the bot is ready for these tests.
If you had any time left to spend besides that, we could find other things; there is no shortage of work to improve the mining bot :wink:

@MutantWizard, I have some questions about the bot, specific for the first version of the bot, before developing the handling of belt depletion:

Can we remove these clicks on tabs in the overview by using the same tab all the time?
Can we start all warps by clicking on the solar system icon to open a menu and then follow a bookmark in there? I searched for a screenshot, did not find one so far.

Can we remove this ‘scroll down in overview’ by sorting the overview by distance?

I am using the default overview which means General tab doesn’t have Astroid Belts and Ore Asteroids. The mining tab doesn’t have anything except Asteroid Belts and Ore Asteroids. If we use the Overview at all not sure how we can eliminate either tab other than customizing the Overview before using the bot.

That works much better. Everything is available in the Bookmarks menu so no need to make above 2 clicks. We just keep the Overview in the Mining tab for the Ore Asteroids.

Of course we can and considering that when an Ore Asteroid is depleted it explodes and disappears then there is no need to remember that its depleted. I had it sorted by name only to make it possible for me to manually keep track of depleted Asteroid Belts. Considering the possibility to use the bookmarks menu even that isn’t necessary.

Excellent, that makes the bot simpler still.

Today I implemented this mining bot. I made some interesting discoveries along the way and found a framework to support such sequentially laid out bots. It is a small language that supports coding the bot very close to the bot’s description you posted. For example, here we can see how this language is applied to model the part which happens in the asteroid belt:

The bot displays the text messages modeled on these steps in the console window, so you can see which step it is executing at the moment. Most of the text messages originate from your bot description; I filled in details in some cases.

Conditional jumps (using the JumpToSequence instruction) support modeling branching. A new memory reading from the game client is taken for the execution of each step. In each step, the decision on how to proceed is made solely based on the current impression of the bots environment.
Control flow is modeled using the BotProgramStepResult type. The Wait case means the same step will be executed again after taking the next memory reading from the game client.

You can run this bot by using following bot source: bots/implement/applications/eve-online/eve-online-mutant-wizard-mining-bot at 584d7d67a66c7796db160e67096b079373dadf5e ¡ Viir/bots ¡ GitHub

Setup instructions for this version:

  • In Overview window, make asteroids visible.
  • Set the Overview window to sort objects in space by distance with the nearest entry at the top.
  • In the Inventory window select the ‘List’ view.
  • Setup inventory window so that Ore Hold is always selected.
  • In the ship UI, hide all modules which are no miners.
  • Enable the info panel ‘System info’.
  • Create bookmark ‘mining’ for the asteroid belt.
  • Create bookmark ‘unload’ for the station.
  1. Did all the above preparation and docked at the station,
  2. Started the bot in CMD
  3. Bot loaded
  4. Bot undocked and last line in CMD displayed “Travel to asteroid belt: open bookmark” and then nothing. Just flying at standard speed of about 400 m/s. Probably in undocking direction.
  5. I manually right click in space and open context menu and bot automatically positions on the mining bookmark but does nothing else. In CMD the bot last line changes to “Travel to asteroid belt: click menu entry to start warp”
  6. I manually chose mining/Warp to Location/Within 0 and go through the whole mining process. Bot does nothing further and nothing further happens in the CMD window.

Thank you for the feedback @MutantWizard!

This seems a problem.

The undocking and warping parts work differently than in the first description from How to Automate Mining Asteroids in EVE Online - #43 by MutantWizard.

I adapted these parts after subsequent discussions about how this part could work.
One of the assumptions I made while implementing this part is that we can use a bookmark:

But seeing the results of the test now, it seems it is not clear how the warp is done in the game. This is the process implemented in the version I linked yesterday:

In there, I see the last step before the one you saw it not continuing on is:

“Travel to asteroid belt: open solar system menu”

This is the step in which the bot clicked on the solar system icon in the current system info panel. I also see it used the left mouse button to do this. Do you see a problem with this approach? Did the solar system menu open while the bot was in this step?

I found this screenshot which helps illustrating the idea behind where to open the menu:

That linked bot code was based on the idea that we could open that menu there by clicking on the sun icon left in the screenshot using the left mouse button.

In your screenshot you have the click tree Asteroid Belts/Isikemi II - Asteroid Belt 1/Warp to Within 0 m. For me the click tree to the same level would be Asteroid Belts/Isikemi II - Asteroid Belt 1/Warp to Within 100 km. To get to Warp to Within 0 m I have to follow the click tree one more level down. Asteroid Belts/Isikemi II - Asteroid Belt 1/Warp to Within/Within 0 m. The difference is due to people setting different default warp distances in the first line. So if we can add that additional level down it will be the same for everybody.

Yes it opened up the context menu but too early and only one level. It opend the menu while still docked which then disappeared after undocking. I had to recheck this coz didn’t notice it the first time.

Interesting, so that explains the problem you mentioned here:

Because, the bot did expect this menu entry:

I adapted the bot to the menu layout you described:

This explains while the bot did not continue here:

The program was not designed to handle the disappearing menu.
Can we fix this by waiting for the overview window before continuing into that step?
I made a change to the bot to make it wait on the overview window here:

You can start this version using the following bot source: bots/implement/applications/eve-online/mutant-wizard-mining-bot at c3f15d7cebf6f60d5dbdc603a433ede36cd45fcf ¡ Viir/bots ¡ GitHub

Does the travel to the asteroid belt work with this version?

Working on this bot and from your comments I discovered new ways of doing things. I been now experimenting with use of the menu under the system sun icon in the system info panel. Just encountered an issue which may or may not have any effect on the bot at some point in time. I tried docking to a specific station by clicking on it in the system sun icon. I docked and then started looking for my stuff. Nothing to be found! Then I noticed I was in the wrong station so I undocked and tried again more carefully thinking I clicked the wrong station but I end up again in the same station which is a different one then in the system sun menu. These things may not be 100% accurate.

We are one step further.

  1. Bot undocked even though in CMD it reported some error which disperses too quick to see what it is.
  2. Once out in space it continues traveling at standard space speed without warping anywhere.
  3. Bot opens menu via system sun icon, positions itself on "mining’ and opens first submenu and that is it. Stops there.
  4. Last line in CMD reads "Travel to asteroid belt: click menu entry “Warp to Within”

Is it possible to add a pause command similar to exit command thats already there as ctrl+alt?

I found a bug in the bot code, which caused a display of an error message. This bug also led to a delay by one step at the end of completing each sequence. I fixed this now to get rid of these distractions:

Which raises the question: What is the situation then in the game client? Is the “Warp to Within” menu entry on the screen?

Yes, you can pause the bot by pressing CTRL and ALT keys at the same time.