Is there access to the game API to obtain certain data?

For experimental purposes, I have plans to try to make a RL (reinforcement learning) agent for FAF. Are there ways to get game state and send commands through Python?
For example, is it possible to receive data from the game such as the position of units, buildings, and also send commands to build at certain coordinates, select units and send units to a certain point, etc.? Is there a gaming API?

No, there is no such API. You also won't find the information in replays as the game is fully deterministic - it only contains the user input.

A work of art is never finished, merely abandoned

@zetroy The game is so complex, it will take your agent thousands of virtual years to get close the human level (took AlphaStar 200 years), and a lot of money (costed DeepMind $26 million just to train AlphaStar). I know RL to a degree, and I have been making my own environments. From my experience I recommend you to just use what was made specifically for RL (like Unity ML-Agents). That is, if you are learning.

You can write a sim mod that will get units and issue orders. It won't be in python - it will be in LUA. And it will only work for one match, I mean you will have to actually view the replay to get data out of that replay.

To speed up the 200 year thing you could use cloud hosted instances. Sounds like a lot of effort.

I think you would end up with two mods, one to run on old replays to extract data. The other 'ai' mod would use your extracted data and actually make decisions. That ai mod would have to run on all machines I guess

Something like that. I reckon you could get it working but it wouldn't be easy

@melanol My maximum goal is to train the agent to play normally against the simplest in-game AI bot.
Yes, I know about Unity ML-Agents, but I’m not interested in those simple environments, I want to start right away with FAF.

@nine2 Are there ways to use Python to call LUA functions and get the necessary data or send commands from there?
In Lua I will not be able to write the necessary libraries for the operation of the RL agent, which are available in Python.
I have no plans to train on repetitions yet; the agent will be trained in an active game.

If you are big brain reverse engineer, maybe you can make what you want, but otherwise no.

“Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”
— Steve Jobs.
My UI Mods

Good luck with your project

I think it can be done but it will be very difficult

Map hacks existed back in the GPGnet era. Somehow, I have never seen or heard of them again in my entire time on FAF. Surely some people somewhere must know of them though.