Is it possible to implement AI as UI mod?

Everything about mods can be found here.

Moderator: Morax

Is it possible to implement AI as UI mod?

Postby mas » 18 Nov 2018, 12:38

Hello

Is it generally possible to implement some (basic) AI logic as UI mod?
The mod should be be able to:
- Issue its own move/attack/assist commands to units
- Build structures and units on its own
- Recognize enemy targets (including radar marks) to attack or defend from
- Recognize allied targets to assist

So far, reading existing mods source code I have found some useful hints on the next features:
1. How to enumerate own units
2. How to command a structure to start upgrading
3. How to add a unit into a factory build queue
4. How to issue move commands (very limited information)

But other important topics remain unclean.
So, can anyone here explain (better of all - point to clear example of) how to accomplish the next things with UI modding?

1. Command an engineer to build an arbitrary structure at an arbitrary map location (for example, near a closest mex)

2. Issue a move / assist / attack / reclaim command to a unit with an arbitrary target

3. Enumerate allied units and structures (including the ones being under construction)

4. Enumerate known enemy units and structures, including radar marks (!)

5. Set rally point for a factory (including setting it as aggressive move target)
mas
 
Posts: 7
Joined: 18 Nov 2018, 12:11
Has liked: 4 times
Been liked: 0 time

Re: Is it possible to implement AI as UI mod?

Postby Myxir » 18 Nov 2018, 12:54

the main problem is that a lot of important info bypasses the UI layer and is only rendered visually.
such as positions of radar marks or enemy units, info of enemy units (unless your mouse hovers over them explicitily), even the type of units that your own untis are ordered to attack

given those constraints, it's pretty hard to come up with intelligent mods, at best you can make them do minor micro tasks
Unhappy with balance http://i.imgur.com/q5G2BlM.png
User avatar
Myxir
Evaluator
 
Posts: 791
Joined: 09 Apr 2012, 14:01
Has liked: 94 times
Been liked: 306 times
FAF User Name: Washy (irc)

Re: Is it possible to implement AI as UI mod?

Postby mas » 18 Nov 2018, 13:14

Ok, thank you, Myxir.

So it turns out that my original question number 4 (and maybe also 3) is answered as IMPOSSIBLE. Ok.

But what about the first ones:
1. Command an engineer to build an arbitrary structure at an arbitrary map location (for example, near a closest mex)
2. Issue a move / assist / attack / reclaim command to a unit with an arbitrary target

If I knew how to do it, i could develop an UI mod to automate building up a base with good economy. So ok, performing warfare is not possible due to lack of data on enemy targets, but building economy can be also an interesting task to start with...
mas
 
Posts: 7
Joined: 18 Nov 2018, 12:11
Has liked: 4 times
Been liked: 0 time

Re: Is it possible to implement AI as UI mod?

Postby speed2 » 18 Nov 2018, 13:16

You can't do those in the UI either

Like to issue move and attack is kinda possible, but I won't explain the way, since when ppl start to abuse it, it will have to be patched out.
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Is it possible to implement AI as UI mod?

Postby Uveso » 18 Nov 2018, 19:09

speed2 wrote:Like to issue move and attack is kinda possible


well, if you have the old sorian functions in mind... I removed them in AI patch V2. :mrgreen:

[Edit]: "AI as UI mod" = Bot = Cheat. I don't like that...
Last edited by Uveso on 18 Nov 2018, 19:20, edited 1 time in total.
User avatar
Uveso
Supreme Commander
 
Posts: 1788
Joined: 11 Dec 2015, 20:56
Location: Germany
Has liked: 70 times
Been liked: 291 times
FAF User Name: Uveso

Re: Is it possible to implement AI as UI mod?

Postby speed2 » 18 Nov 2018, 19:18

Uveso wrote:
speed2 wrote:Like to issue move and attack is kinda possible


well, if you have the old sorian functions in mind... I removed them in AI patch V2. :mrgreen:

No and don't ask :P
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Is it possible to implement AI as UI mod?

Postby mas » 18 Nov 2018, 23:49

Ok, i see my whole idea turned out to be something scandalous, because it could cast a shadow on the principle of strict differentiation between organic and robotic players. I guess any kind of real cybrans would not like that principle at all :) I do not know if it is really so important for everyone to know for sure what rules every hostile army - a human, an algorithm, or some complex system of both. For me it would be even more intriguing to play if any opponent could turn to be AI... if AI could play well enough and it would be hard to guess. It could be like part of game story is coming true right now :)

For me cheating is breaking game physics like programming enemy object to die without inflicting damage on it or like detecting an object that should not be "physically" visible from my current position. But why it matters which way i decide what commands to issue and if i use some tool to boost my mind or even APM? If using ecomanager is not cheating, why using some tool to give automated mass commands is so bad?

But ok, if you insist such things should be ruled out, i am not going to argue too much. Let it be forbidden... at least for the moment (when existing AIs are not too good)
As far as i understood you, i should never try creating a bot, or i will be banned for that.
But if i create a bot that requires specific SIM mod to run? And if mod name and lobby title clearly states it is about bot testing, is that also against the rules?

Also i could try to create "regular" AI script like Sorian AI. But as far as i learned, programs like Sorian AI are only tweaking settings of some AI code internal to the game core, which still continues to make some critical decisions. What if i wish to write an AI program that will control everything in detail, giving exact commands to every entity like player does? And detecting objects like player does (via radars and unit vision)? Is it possible with "normal" AI scripting or it requires bot creation using some SIM modding for bot-game interface?
mas
 
Posts: 7
Joined: 18 Nov 2018, 12:11
Has liked: 4 times
Been liked: 0 time

Re: Is it possible to implement AI as UI mod?

Postby speed2 » 19 Nov 2018, 10:04

WIth mods like Ecomanager, there's always heated discussion that leads nowhere :D Its allowed, some consider is cheating, some don't.

What I was speaking about, which would be already over the line is for example a UI mod that can hover bomb pretty much unlimited number of bombers at the same time. Washy made that mod, just to demonstrate that it's possible.

Writing a new AI that would control the units in more detail is possible, but it will always have to be a sim mod. Uveso made his own AI, same for Softly, which should be already better than Sorian. And I'm sure it can still be improved.

There's a subforum for AI if you wanna start with it /viewforum.php?f=88
And there should be some basic guide on the wiki on adding a new AI.
User avatar
speed2
Contributor
 
Posts: 3189
Joined: 05 Jan 2013, 15:11
Has liked: 636 times
Been liked: 1119 times
FAF User Name: speed2

Re: Is it possible to implement AI as UI mod?

Postby Franck83 » 19 Nov 2018, 11:29

Hi mas, on each competitive game, you need a common set of rules between players. No one wants to play a competitive game where there are areas of shadows on the assisting features between players.

You want to change rules or balance ? you want add creative assisting tools ? just go on sim mod.
Alliance of Heroes Mod is out ! Try it ! It's in the Mod Vault !
User avatar
Franck83
Evaluator
 
Posts: 538
Joined: 30 Dec 2016, 11:59
Location: France
Has liked: 114 times
Been liked: 122 times
FAF User Name: Franck83

Re: Is it possible to implement AI as UI mod?

Postby mas » 19 Nov 2018, 15:53

> Uveso made his own AI, same for Softly
I did not looked into Uveso's source code yet, but what Softly have done... that is not an AI algorithm. Absolutely. It is a set of a few very simple rules for the "predefined" AI algorithm that is a part of the game core. If you look at the code by Softly you will see it instantly - it is a few lines and has nothing to do with any real AI research.

My primary question is not how to write rule files for game internal AI algorithm to improve it a bit - that is of zero interest for me.
My primary question is how to retire that in-game AI completely and take full algorithmic control on every unit and every command.
I had an idea of creating an AI mod that can turn human player into a "bot" - (after pressing a hotkey) it overtakes control and starts commanding all units and structures. The intention was not to cheat and deceive other players (and I hardly could win games like that easily - years of work are required to create a script that will win a good battle).
My intention was to get rid of built-in AI engine _completely. Deactivate it. And it is not active when game thinks human is playing.
Also, i had plans to test specific AI functions separately during a "normal" game - like (A) building economy, (B) micro-controlling anti-air fights, ...

Does Uveso or anyone else knows how to get rid of built-in AI engine? Please note - I want to create a new AI from scratch, not to write a set of rules for build-in algorithm to work better, but to write a new algorithm itself (based on AI science), not using _any function of the pre-existing one (I need that for clean experiment)
Last edited by mas on 19 Nov 2018, 15:58, edited 1 time in total.
mas
 
Posts: 7
Joined: 18 Nov 2018, 12:11
Has liked: 4 times
Been liked: 0 time

Next

Return to Mods & Tools

Who is online

Users browsing this forum: No registered users and 1 guest