Anomaly Bot - Elm coding

Looking into converting Kaboonus anomaly ratting script into elm coding …

Has anyone done this?

Anyone interested in doing this?

Not the same thing but related: Looks like I will soon make an anomaly ratting bot.

But instead of trying to convert everything from another script, I will go more by the feedback I see from players. So I don’t know how similar it will be to the script from Kaboonus.

I was going to create what I would believe an ideal flow of steps for this bot … hopefully you would consider my feedback in what you are creating … I think this type of bot script will get a lot of activity …

I guess that requires that I post what I am creating in the first place. Uploading the working bot code is not going to be sufficient, because the program code is only a small part, the tip of the iceberg.

To be clear, my goal is a different one: I don’t want to convert a script, but only find an anomaly ratting bot that works well today and is easy to understand.

So, where do I get the information from that allows me to write code?
The source of information is feedback from playing the game. Usually, most or all of this feedback comes from other people who share their observations in various ways, such as publishing training data sets.

There is also another way to get the training data: I will soon have access to a game account with a setup sufficient for anomaly ratting. This way, I can do the live testing myself and get the training data faster. As a result, I can find a working bot within a few hours.

For me, there is yet another source of information: The experience with A-Bot, which was an earlier anomaly ratting bot. Since this project started in 2016, we already got a lot of feedback on the approach there. So I learned that an architecture based on a decision tree is sufficient for this activity and works well. Also, the source code from A-Bot encodes the knowledge of how to do the ratting in-game. It is easy for me to understand because it is organized to follow the same coding principles as explained in the guide on developing for EVE Online (In the navigation basics chapter)

Before writing the first piece of code, my idea is to start with the combat part of the bot. When I see that the combat works, I can add other components, like finding anomalies and warping there.

The mining bot example project already implements a decision tree (How to Automate Mining Asteroids in EVE Online - #109 by Viir), so I start implementation by copying the mining bot code.

I want to speed up the development process, so I will use a trick to get a head start: Before even attempting the first live test with a game client, I try to convert the combat part of A-Bot, coded in the file Combat.cs

This combat function is distributed over 53 lines of code and contains a lot of information we can reuse for ratting. One way to summarize it is to list the subtrees it emits that can lead to effects:

  • Unlock target.
  • Lock target.
  • Activate weapon module.
  • Launch drones.
  • Engage drones.
  • Return drones to the bay.

The unlocking of targets might have been added because there is a risk that a bot will accidentally target the wrong object. Even if this happens only one out of ten thousand times, accounting for this helps avoid interruptions.

Let’s take a closer look at locking new targets: The way it uses TargetCountMax, we can see that it will lock multiple targets, to allow us to continue attacking as fast as possible when one target is defeated. This feature makes the bot more efficient as it will avoid waiting for new target locks during operation. The downside is it makes the code more complex than the simplest possible combat function, but since it is easy to translate this code, it is OK to use this extra feature right from the start.

We can also see that there is some filtering going on to find the next overview entry to lock a target: It is not sufficient to look for entries which represent rats to attack, because we might already have locked that object. To avoid this, the combat function filters out the overview entries which have any of these icons:

  • Indicating we have locked the object as target.
  • Indicating we are in the process of locking the object as target.

You find this filtering expression on line 87

Attempting a rough translation of the A-Bot combat function, I arrive at this decision tree:

  • Branch: Is there a target to unlock?
    • Yes: Unlock that target.
    • No: Branch: Is there at least one locked target?
      • No: Branch: Is there at least one overview entry to attack?
        • No: Return to integrating function: We are done here.
        • Yes: Use ‘Lock target’ on that overview entry.
      • Yes: Branch: Is there any inactive weapon module?
        • Yes: Activate that module.
        • No: Branch: Is the number of drones in the bay greater than 0 and the number of drones in space less than 5?
          • Yes: Launch drones from bay.
          • No: Branch: Are there drones in local space idling?
            • Yes: Engage drones.
            • No: Branch: Is there an overview entry that we should lock as target? (See the filtering of overview entries explained above)
              • Yes: Use ‘Lock target’ on that overview entry.
              • No: Wait

To identify the weapon modules, we can reuse the approach from the mining bot: Let the user place the modules so that only weapon modules are in the upmost row: bots/Bot.elm at d2c881f35b59bdbdd6616b8f1c1e40332c403558 · Viir/bots · GitHub

We can use the second row for modules that should always be active.

Since the mining bot already implements the grouping of modules into rows, we can copy the code from there.

For anyone interested in a ratting bot based on the newest EVE Online framework: I just uploaded this ratting bot, based on the findings above: bots/implement/applications/eve-online/eve-online-ratting-bot at faab9aa0c0d1fc20a7e7bc3b4027cf8a2052184b · Viir/bots · GitHub

You can run this bot as usual with the run-bot command:

botengine  run-bot  "https://github.com/Viir/bots/tree/faab9aa0c0d1fc20a7e7bc3b4027cf8a2052184b/implement/applications/eve-online/eve-online-ratting-bot"
1 Like

If you are docked nothing … will not undock

I manually undocked and made sure set up was right then …

Shield HP at 100%. Overview entries to attack: 0 + I see we are in space. ++ I see no locked target. +++ I see no overview entry to lock. ++++ Wait ----

Bot just waits …

I am going to warp to a site to see what happens …

Warps in and just tries to approach targets which is not what most afk ratters do

I am going to assume most users will want a bot that is for afk ratting with greatest isk reward to least risk.

Essentially bot needs to …

Activate hardeners (appears to do so)
Warp to a particular anomaly … such as a hub (does not do this) - should go to probe scanner window for this
Upon landing on site -
Is there someone already there?(If yes warp to safe, then warp to another site not the one you just went to)
If no, launch drones, then choose a predetermined large collidable object to orbit at 20 KM (distance should a variable to modifiy if wanted), turn on afterburner module (most afk ratters speed tank), lock 3 targets (usually smallest ships first as they usually have ewar), send drones to attack
The bot should now repeat locking smaller targets first to largest (generally the larger targets will spawn next wave as well) and send drones to attack
Once no more targets to be locked, recall drones, stop afterburner and bot should warp to next site and repeat

There are other things to manage but this would be a start for me - other things would be emergency warp out, monitor local for hostiles(BOOLEAN Variable), recall a drone if starts showing armor damage

Many of these functions are included in the Kaboonus script

Hope that helps

I am confused by the idea about undocking. Did you expect that bot to undock?

When I looked at the code it had seen mentions of “Are we docked” wasn’t sure if this was intended behavior or not … just trying to be helpful …

Ok, now it makes sense, thank you for the report. Just surprised that your report was mostly about scenarios without rats.

I was just trying to put forth a framework for a decision tree that a regular user would be looking for …

Ok, I can try to translate that when I have more time.

Meanwhile, I added the orbiting functionality to the anomaly ratting bot:
https://github.com/Viir/bots/commit/d3bae4e41a790bd7c681750198da0aea14fb285a

Hi guys, escpecially Viir!

This is my first post, just registered and blabla.

I was looking at Kaboonus anomaly ratting script (.CS file) and it had, at first sight, everything that i would need to run my bots (e.g. doing havens - orbit Pirate Gate, drop drones, retreat if hostile/enemies enter local, etc.).

I noticed you were trying to make a .ELM bot that does some (or all) needed stuff to rat in anomalies. I have to notice that it works semi-ok. It warps to anomaly (can’t predifine what anomalies i want to run) - and it does 2 warps - 1st to initiate warp and a 2nd that does nothing (obviously). It orbits every rat that is trying to kill, which is ok but not needed in my case.

To be honest, bot I would be interested in should consider some editable settings:

  • name of anomaly to do (Guristas Haven in my case)
  • name of orbit object (Pirate Gate in my case - i don’t need to switch orbits)
  • F1 to F8 modules to run when exiting out of warp in each anomaly
  • name of the station in Overview to dock to when ratting is finished and/or enemy comes in the system
  • name of valuable wreck can to loot (this could be done by making bookmark, warping off, warping back to bookmark, looting, deleting bookmark)

I noticed that your bot is doing Approach and Orbit on the same target for 2-3 times in a row and that sometimes it engages target, sometimes no.

You’re doing a wonderfull job in here, keep it up!

Here is a version that supports setting the name of the anomaly: bots/implement/applications/eve-online/eve-online-anomaly-ratting-bot at 31be67cfaf13fb94cf16f7db258489becc6409ba · Viir/bots · GitHub

You can use the --app-settings argument to set the anomaly name:

botengine run-bot  --app-settings="anomaly-name=Guristas Haven"  https://github.com/Viir/bots/tree/31be67cfaf13fb94cf16f7db258489becc6409ba/implement/applications/eve-online/eve-online-anomaly-ratting-bot

Does that work for you?