BotLab Devlog

An update on the example EVE Online mining bot mentioned earlier:
Recently @Merizon discovered an issue with that bot. Jan found a setup not yet sufficiently represented in the training data used to develop the bot:

Using the screenshot of that setup, I expanded the training data set to cover it too. The guides now point to this new version of the mining bot.

In the last two weeks, I made several improvements to the botengine Windows app and the tools to run bots.

Online Bot Sessions

When you start running a bot, you now have the option to start an online bot session to help you keep track of your bots. Online bot sessions also allow you to check the status of your bots from other devices such as a smartphone. You can see an overview of your online bot sessions by logging in to your user account at https://app.botengine.org/

monitor your bots using online bot sessions|

Bot Catalog Improvements

The bot catalog now got its own dedicated website. This week I improved the UI there to make it easier to read bot details and distinguish the entries. Head over to https://botcatalog.org/ to see the new, improved list of bots.

Easier Configuration

Version 2019-12-11 of the Windows console app comes with a new function to help you set up your environment: You can now choose to register the executable file so that you can use botengine in the Command Prompt instead of typing the complete path to the executable file. Use the sub-command install-botengine-command to perform this automatic configuration. (It will not affect the same Command Prompt window, start a new Command Prompt to try it)

Introducing the Alternate UI for EVE Online

In the last two weeks, I worked with Zachary Kline (@BLindGuyNW) to help blind people play the video game EVE Online and make the game client more accessible.

One of the results of this collaboration is an alternate UI for EVE Online. The alternate UI renders the contents of the regular game client into an HTML document. The HTML based representation enables better access to screen readers. The information there is on the same level of detail as available to bots, supporting in-game activities as diverse as ratting or mission running. Usually, this kind of structured information is not readily available from the game client in such detail; there is no supported API for this level of detail from the game developer CCP. By using memory-reading on the game client process, we get this information without depending on image processing.

You can read more about the evolution of the alternate EVE Online UI at Using Bots for Eve Accessibility

A guide on how to set up and use the new tool is located in the Sanderling repository at https://github.com/Arcitectus/Sanderling/tree/master/implement/alternate-ui

1 Like

Good news for people working with EVE Online!

I recently explored memory reading from the 64-bit variant of the EVE Online client. It turns out we can continue using the same approach as before, after adapting to the new 64-bit pointer size. I implemented the memory reading for 64-bit clients and added the program to the Sanderling repository at https://github.com/Arcitectus/Sanderling/tree/master/implement/read-memory-64-bit

The new memory reading program is also available packaged in a command-line application. You can use the --pid parameter to pick a live process to read from or use the --source-file parameter to read from a process sample file. Using the --output-file parameter, you can make it save the memory reading results into a file for further inspection with your favorite JSON viewer.

Since I was working on memory reading, I used the opportunity to make some improvements to the serialized representation used by other software to consume the results of the memory reading. The names in there now match the names found in the EVE Online clients’ memory where applicable. Also, the overall structure of the serialized UI tree nodes now matches the one found in memory more closely: The properties coming from the python dictionary object are grouped accordingly in the JSON representation.

Another result of this exploration was a new tool to save process samples to files. The older one did not work correctly with 64-bit processes, so we now have a new reference tool to collect samples for memory reading development. While we use process samples also for development for EVE Online, the sample format is more general and can be used with other game clients as well. I uploaded a guide on how to use the tool at https://github.com/Viir/bots/blob/master/guide/how-to-collect-samples-for-64-bit-memory-reading-development.md

1 Like

@frodd reminded me that I can expand a bit more on how to use the new memory reading for 64-bit EVE Online clients.

In the last post, I had covered the foundation, the core implementation that is implemented in C# and can be integrated into applications in the form of an .NET assembly, packaged in a DLL.
Using the DLL is a way for people who already have significant experience with a programming language that easily integrates .NET assemblies.
But most people using Sanderling don’t have this kind of prior experience. Also, dealing with the DLL directly is unnecessarily complicated for most applications. For developing intel tools or bots, there is an easier way to use memory reading.

After implementing the 64-bit memory reading and said DLL, I looked for a way to package this in a way that is both easier to use for beginners and also a good starting point for typical applications.
As a result of this exploration, we now have two complete examples of how to use the new memory reading for 64-bit clients, without worrying about such implementation details like the DLL. These examples are two bots:

Since these have the most usage and test coverage, these are the best starting points for developing an intel tool or bot that works with the 64-bit client.
A quick summary of what these examples get you:

  • No need to think about a DLL, just write your program.
  • No need to use a programming language as complex as C#. No runtime exceptions like in C#. Instead, static analysis checks your program to point out problems before you start your program.
  • Parsing of the memory reading, to transform it in a form that is easier to use. The parsing also includes parsing of strings into numbers with uniform units (E.g., distance texts in the overview window).
  • In the mining bot: A framework that makes it easy to build advanced EVE Online bots, based on the learnings from bot development projects like the mission running bot and the anomaly ratting bot.

As always, I am glad to answer questions in case you run into problems.

An update regarding EVE Online development:

@ORly recently helped improve the robustness of the parsing of the EVE Online clients user interface. (Mining bot "I cannot see the ore hold capacity gauge.")

To summarize the developments: @ORly discovered a scenario in which reading the capacity of the selected container in the inventory failed. They provided training data for this scenario, resulting in an update to the standard parsing library for EVE Online. I updated the example apps here to use the new version of the parsing library:
https://github.com/Viir/bots/commit/43e433706b3673ce7fa66b286978ef165cc4bfdc

By the way: In case you are looking for an easy way to keep track of updates to the EVE Online parsing library, you can use the history view at https://github.com/Viir/bots/commits/master/implement/applications/eve-online/eve-online-mining-bot/src/EveOnline/MemoryReading.elm

The last six weeks have been quite busy. Now I am trying to remember the most outstanding developments, to give an overview.

After three weeks of testing and iterating, near the end of January, the new Tribal Wars 2 Farmbot was mature enough to replace the old bot from 2018. As I now see on the catalog, the new farmbot quickly became popular, rivalling the diverse applications for EVE Online.

For EVE Online, I also saw some noteworthy developments: After the mining bot had been ported to the 64-bit client, it was time to tackle the next in-game activity calling for automation. So in February, the anomaly ratting bot was updated to support the 64-bit game client too, just in time to prevent interruptions by the phase-out of the older game client.

Diverse questions led to clarifying how to develop for EVE Online, for example, how to efficiently find the objects in the game to use when working on an application.

Besides improving the guides, the framework and tooling for EVE Online itself saw several improvements: For example, the shortcut to inventory items now also works for all view types. Before, that shortcut was limited to the List view, which sometimes caused confusion. The setup process for the tool to inspect the parsed user interface was simplified, reducing the number of steps. Also, the inspection views were expanded to offer a comprehensive tree view of the parsed user interface in the game client. In the views for the individual UI nodes, you now also find the new property getAllContainedDisplayTexts. This addition in the inspection view reflects the widespread use of this derivation in bots and other apps.

Thank you all for sharing videos, screenshots, process samples and other data about your scenarios and helping to improve the bots!

Windows App Version 2020-03-05

Version 2020-03-05 of the Windows app brings several improvements to the user interface.

Making it easier to use online sessions

Some people had reported problems with starting online sessions. It was not always clear how to input the personal key into the UI. The first step to improve on this was expanding the guides to cover this in more detail. Now I also found a way to make the user interface itself simpler to prevent those issues in the future:
Starting online sessions is now easier with the new --online-session option on the run-bot command. When using this option, you don’t anymore have to copy your key for each bot. Instead the engine uses the key you stored as the default on your system. You can set the default key using the new online-session-key store-default-key command. To make this easier too, the web UI at http://app.botengine.org/ shows you the complete command. Just copy and paste to run it in the command prompt.

As usual, you can explore the new commands in the botengine app using the --help option:

PS C:\Users\John> botengine  online-session-key  --help                                                                             Subcommands to manage online bot session keys. You can test keys and store a default key.

Usage: BotEngine online-session-key [command] [options]

Options:
  -?|-h|--help        Show help information

Commands:
  reveal-default-key  Display the stored default key. Other commands don't display the key to avoid accidentally sharing this
                      secret.
  store-default-key   Store the default key to use when attempting to start an online bot session. I will use this key when you add
                      the '--online-session' option to a 'run-bot' command. The key will be stored in a file scoped to your Windows
                      user account
  test-key            Test a key to see if it can be used to start an online bot session.

Run 'online-session-key [command] -?|-h|--help' for more information about a command.

Improving error messages and recommendations

I refined several error messages and recommendations in the user interface. For example, it now makes suggestions in case of misspelling commands or options:

Contributions From the Community

@Lanson and @TheRealManiac refined guides and bots:

There is a new guide for EVE Online developers to find things faster in the game client user interface: bots/parsed-user-interface-of-the-eve-online-game-client.md at a364d5d7c120450786ba05de2ca5ad5dd3931523 · Viir/bots · GitHub

Visual maps help you where to find things and how shortcuts to popular elements are named in the framework:

It also contains examples of how to use these shortcuts in your app.

1 Like

@Medede was looking for help with a modification to a EVE Online mining bot: Help with mining bot

I programmed that modification and also recorded a walktrough on how to implement it:

In this video I show how to add a setting to a botengine app.

1 Like

The Tribal Wars 2 farmbot recently saw a lot of updates to make it more efficient. I updated the guides to integrate version 2020-03-25. To summarize, the most significant improvements:

  • Faster farming: The newest version sends between 800 and 1000 attacks per hour.
  • New feature to avoid smaller barbarian villages. You can set a threshold for minimum points using the app-settings.
  • Improved user interface, including a detailed report on the last completed farm cycle and many improved status description texts.

I also updated the guide on the forum for the new version: Farm Manager - Tribal Wars 2 Farmbot

@Murderburger shared a question about an EVE Online mining bot:

I explored and added an implementation to add this to the display:

In this video I explain the development process:

Jim @ElHefe shared an improvement to EVE Online mining bots here:

This gives an app-setting that lets you define what you want the threshold to be. It keeps the default at the original 99%.

When I have a 7000 capacity in my Ore hold, and my ice miners cycle at 1500 each every two minutes, I don’t want to waste two minutes every round trip for the last few percents to fill up.

Several people asked about adding defense functionality using drones to EVE Online mining bots. We had people come up with different approaches to defend against rats, and these resulted in various implementations.

Now I made this video of a more recent variant, explaining how it works and showing all the programming:

The merge commit with the code changes is at Merge - add drones defense for EVE Online mining bot · Viir/bots@485cec1 · GitHub

Today I updated the botengine reactor and the catalog.

In the view of online sessions, you can now directly see the beginning of the description of the app used in that session. You can see this, for example, in the list of most recent online sessions:

Reactor most recent online sessions

People reported problems with composing the commands used to run apps with non-default settings and running those commands in the Command Prompt. The catalog can now do this for you automatically. All you do have to enter your settings into the input fields. The system then generates a script for these settings that you can download and execute via double-click from the Windows explorer.

Interface to configure how to run an app

The settings you enter here are stored in the URL in the web browsers address bar, so you can bookmark your settings or share it with others.

This new configuration interface is automatically available for all bots you published on the catalog; you can open the tool using the ⚙️ Configure app button in the catalog entry:

Button to enter configure run app

I made this video summarizing the developments of the past week:

I updated the example projects for EVE Online to improve app settings. Last weeks changes benefit both users and developers:

  • Users now get faster feedback on app settings: The new app framework parses app settings as soon as it receives them from the user and sends the response with the response to the same app event. This change also means users do not have to wait anymore for the completion of the startup sequence to see results for their app settings string. The new immediate response has further implications: It also means that the whole of parsing and getting the response can be replicated easier in other environments, such as a web browser. So mid-term, this enables the inclusion of a quick check of any app settings string into the interface where users type their settings. Starting an app is then not necessary anymore to see if the settings are valid: Any time the user types a new character, they can see the result of the app-specific validation within one second.
  • Developers now find more helper functions in the framework to compose app settings syntax for their project. The Common.AppSettings module contains building blocks to help with parsing and generating specific error messages to guide users of your app. As shown in the example projects, apps integrate the app settings parsing and validating using the new parseAppSettings field in the framework function to compose an app.

Allan shared a new feature for the EVE Online mining bot with us: This version he published on Github docks to structures:

You can run this mining bot from FrontendWeb.Main

To make finding bots and other artifacts easier, I added this search box to the catalog today:

search on the catalog

The search box lets you filter published artifacts by their description text, tags, the names of authors, framework version, etc…