Company of Heroes: Eastern Front

Author Topic: Give the AI a voice  (Read 6150 times)

Offline Danou

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Give the AI a voice
« on: May 11, 2012, 07:49:59 PM »
Ok, I throw this suggestion in here, but I don't know if it's possible.

When playing in a team with AI, the AI could give some basic information to the player, using the chat system (chatting to team). This would make it a bit more 'human'.

Communicated information could be:
1. Tech plan (at game start)
2. Tech change (optionally, max 5-10 minutes after game start)
3. Doctrine choice (as soon as chosen)
4. Tech plan achieved (optionally, when reached)
5. Major unit on the field (when it is on the game field)

Point 2. could be a bit tricky. Maybe also point 4.

AI chat example A:
1. "MY PLAN is T1-T3 with fast AC"
3. "MY DOC is Propaganda left-hand-side"
4. "T-90 on the field" (only the 1st T90 is announced)
5. "IS3 on the field" (only 1 IS3 allowed. However, only the 1st unit of each type is announced)


AI chat example B:
1. "MY PLAN is T1-T2 with sniper, Breaktrough DOC"
3. "MY DOC is Propaganda" (ideally the AI would have announced his tech change before, but like human the AI is also not flawless...)


AI chat example C:
1. "MY PLAN is heavy T0 (Sturmovie Ingenery)"
2. "NEW PLAN is T1-T2" (here the AI announced the tech change correctly)
3. "MY DOC is Urban
5. "IS2 on the field" (only the 1st IS2 is announced)

Offline Pac-Fish

  • Axis Commander
  • Poster of the Soviet Union
  • *
  • Posts: 2494
  • Waka Waka Gluba Gulba
    • View Profile
Re: Give the AI a voice
« Reply #1 on: May 11, 2012, 10:57:32 PM »
I think it sounds cool and actually helpful but IDK if its possible, like u said :-\

Om Nom Nom Nom
"Panzer-Guppy ready for battle!"
"Ha Ha Ha! We have the ZEAL!"
"Grenadiers! Fall In!!"

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: Give the AI a voice
« Reply #2 on: May 11, 2012, 11:04:24 PM »
It reminds me on that commandos ability decryption IIRC. Well some stuff is possible like doctrine for others idk need to try it then i can tell more :).
@Danou
You forgot to add pings to list like Attack here, defend here, capture here :P

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: Give the AI a voice
« Reply #3 on: May 12, 2012, 03:48:14 AM »
@ Danou: You always have the possiblity of seeing what Squads your Allies have created by moving to the Tactical map or changing the camera POV to where a new unit has appeared on the tactical map.

I have one major problem with this scheme. I have noted that other players with the right Tecno-Savvy can eavesdrop on your battle screen.  Red Guard who is a friend of mine would do it occasionally when he was still around. (You got to hand it to the sneaky bastard. I still don't know how he did it). What this means is your Opponent could see all those nifty messages on your screen and have a good idea of your battle plans or capabilities. Ni Kulturni!

I am part of the palindromic AI duo OttojojottO; aka "The Pros from Dover". JoJo may be able to provide you with your Allies Personalities and CT choices on screen IDK. THe Ai personalities are a strange crew. One in particular common to almost all races (factions), Is called Heavy Engineers. It is suitable as a component part for many AI Team Strats. Each AI personality is randomly selected. Heavy engineers will work with a sniper start AI personality but that is not optimal. Heavy engineers works very well with a fast vehicle start, but the AI personalities for Wehr, PE and Sov races are significantly different from Each other. Wher T1/T3 or even T3. PE T1/T3 or T2/T3. Sovs T0/T3, T1/T3, T2/T3 or Straight T3 are all possible. Wher actually has some combo Build Orders (BOs), That I haven't figured out how they work yet. (Pardon my Dutchy Grammar). Thats 9BOs x 3 CTs = 27 configurations needs programmed for just one AI personality. It Ain't gonna happen if I have to do it. I suspect other AI specialists feel the same. I almost never get to play the game when I am doing AI programming. (I don't mind, its fun. Its also very time consuming).

There is something about AI programming you should know. the programmer create a personality and build order for Static Play. Effectively he/she can control the AI players builds for ~ 3 minutes into the game. The programmer has not idea which CT will be associated with the AI personality for any given game. When the BO is completed or before the AI goes Dynamic and the computer completely controls the AI activity. These things can be nudged a little but not much. There is another concept here that I understand but am not sure that I can explain. When the game initializes the AI BO ceases to exist! The easiest way to explain this is the AI is loaded and erased. Meaning the computer is in control of the AI, Not the AI in control of thecomputer. IDK if that makes sense to you or not. It is the best I can do at present. but I know what it means. I hate to rain on a parade. :(

Now for the good news: The Attack here, Defend Here and capture Here Pings can be used to nudge your AI Allies on the battle map. It takes a lot of practice and patience because if you do it wrong you have a huge blob at some part of the field which cant do anything but fire. You've probably seen this condition when too many Squads try to cross afootbridge all at once. I have been known to direct Artillery fire on my own allies to clear the bottleneck and free up pop for my computer Allies. Sometimes I even kill my own squad s to do this if they unfortunately get caught in the blob.  After months of experiments I Actually nudged my AI allies into creating a Kiev-like Pocket. As soon as I noticed this I used my forces in a pincer movement to seal the pocket. The game didn't last to much longer then that and for all intents a purposes the only enemy units on the map were the reinforcements the enemy Ai first hit was building with its freed up pop cap. Those reinforcements arrived piecemeal. IT WAS GLORIOUS.
孫 The
EF_v1.7.10
子 Art
Illegitimi non Carborundum -"Vinegar" Joe Stilwell
兵 of
Sun Tzu says: In warfare one compels and is not compelled by others
法 War

Offline Danou

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Re: Give the AI a voice
« Reply #4 on: May 12, 2012, 03:21:51 PM »
Quote from: jojorabbit
It reminds me on that commandos ability decryption IIRC. Well some stuff is possible like doctrine for others idk need to try it then i can tell more :).
Yes, I suspected some stuff could be difficult to implement...
Quote from: jojorabbit
@Danou
You forgot to add pings to list like Attack here, defend here, capture here :P
I am confident that you develop such a strong AI, that finally the AI gives me strategic advice.  :P


Quote from: Otto Halfhand
You always have the possiblity of seeing what Squads your Allies have created by moving to the Tactical map or changing the camera POV to where a new unit has appeared on the tactical map
Yes I know that, just wanted to simulate the human behaviour. I saw some ppl tell to the team when they have Panther Battlegroup or IS3 on the field.
Quote from: Otto Halfhand
I have noted that other players with the right Tecno-Savvy can eavesdrop on your battle screen. [...] What this means is your Opponent could see all those nifty messages [...]
I didn't know this. In fact, this would be bad. Maybee have a 'chat code' that allows to enable/disable AI messages like 'AI chat on'/ 'AI chat off'...
Quote from: Otto Halfhand
[...]Thats 9BOs x 3 CTs = 27 configurations needs programmed for just one AI personality. It Ain't gonna happen if I have to do it. I suspect other AI specialists feel the same. I almost never get to play the game when I am doing AI programming. (I don't mind, its fun. Its also very time consuming).
In fact, I really don't know how complex the AI personalities are and how they are programmed. Only you, jojo and other AI programmer can estimate how much work it is. I trust you completely.
Quote from: Otto Halfhand
There is something about AI programming you should know. the programmer create a personality and build order for Static Play. Effectively he/she can control the AI players builds for ~ 3 minutes into the game. The programmer has not idea which CT will be associated with the AI personality for any given game. When the BO is completed or before the AI goes Dynamic and the computer completely controls the AI activity. These things can be nudged a little but not much. There is another concept here that I understand but am not sure that I can explain. When the game initializes the AI BO ceases to exist! The easiest way to explain this is the AI is loaded and erased. Meaning the computer is in control of the AI, Not the AI in control of thecomputer. IDK if that makes sense to you or not. It is the best I can do at present. but I know what it means. I hate to rain on a parade. :(
Thanks for this little insight in AI programming.
If I understand, the BOs are some kind of 'definition'. After a BO is loaded you cannot interfere to BO. Either it works well and the BO is executed like planned or it starts to do other things like 'building couter units', etc. Right?
Quote from: Otto Halfhand
Now for the good news: The Attack here, Defend Here and capture Here Pings can be used to nudge your AI Allies on the battle map.[...]
Well, this was part of my next suggestion: Replace these 3 Pings with something more 'Advanced', again using the chat system to give the AI advanced tactical instructions (don't worry I'm joking  :D )

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: Give the AI a voice
« Reply #5 on: May 12, 2012, 11:09:55 PM »
Quote
If I understand, the BOs are some kind of 'definition'. After a BO is loaded you cannot interfere to BO. Either it works well and the BO is executed like planned or it starts to do other things like 'building couter units', etc. Right?

Build Orders (BO) is just a list with some units to make different starts like T1 start or T2-sniper-HMG etc.
Build orders can affect a lot of stuff i made a plugin for custom personality that allows us a lot of stuff like T1-T3 start, T2-T4 start, fast vehicles, some links to CT, etc. BO can be interrupted if AI gets too much damage or if BO is too long.
After BO is finished AI starts to calculate stuff.

I have tried just to give some random pings on map so i can confirm that AI can give you pings to attack, defend etc.

Hope it helps.

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: Give the AI a voice
« Reply #6 on: May 12, 2012, 11:23:49 PM »
Danou,
Quote
If I understand, the BOs are some kind of 'definition'. After a BO is loaded you cannot interfere to BO. Either it works well and the BO is executed like planned or it starts to do other things like 'building couter units', etc. Right?
You described the situation much better than I did. Are you an English Major by any chance? :D

Seriously or in geste I don't think we can change the ping  system and stay within the VCoH -like convention that the DevTeam has adopted for Eastern_Front Mod.
孫 The
EF_v1.7.10
子 Art
Illegitimi non Carborundum -"Vinegar" Joe Stilwell
兵 of
Sun Tzu says: In warfare one compels and is not compelled by others
法 War

Offline Danou

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Re: Give the AI a voice
« Reply #7 on: May 13, 2012, 02:08:08 PM »
[...]Build orders can affect a lot of stuff i made a plugin for custom personality that allows us a lot of stuff like T1-T3 start, T2-T4 start, fast vehicles, some links to CT, etc.[...]
Sounds very promising!

I have tried just to give some random pings on map so i can confirm that AI can give you pings to attack, defend etc.
That the AI could give me pings (strategic advices) was more a joke than a request. Honestly, I think AI should not give me pings.

You described the situation much better than I did. Are you an English Major by any chance? :D
That's quite funny. I often worry that people don't understand me (I speak german, french and a bit english  ;) ). Word order is made by me, but I use Google Translate for vocabulary.

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: Give the AI a voice
« Reply #8 on: May 13, 2012, 02:23:11 PM »
[...]Build orders can affect a lot of stuff i made a plugin for custom personality that allows us a lot of stuff like T1-T3 start, T2-T4 start, fast vehicles, some links to CT, etc.[...]
Sounds very promising!
Yes and makes AI very powerful and more human alike :P

I have tried just to give some random pings on map so i can confirm that AI can give you pings to attack, defend etc.
That the AI could give me pings (strategic advices) was more a joke than a request. Honestly, I think AI should not give me pings.
I lost 5 mins to try it out, so it is not problem ;).

You described the situation much better than I did. Are you an English Major by any chance? :D
That's quite funny. I often worry that people don't understand me (I speak german, french and a bit english  ;) ). Word order is made by me, but I use Google Translate for vocabulary.

Back to your 1st post.

Quote
Communicated information could be:
1. Tech plan (at game start)
2. Tech change (optionally, max 5-10 minutes after game start)
3. Doctrine choice (as soon as chosen)
4. Tech plan achieved (optionally, when reached)
5. Major unit on the field (when it is on the game field)

1. Tech plan -> What is tech plan in your opinion? Tech upgrades or something else?

3. AI chooses doctrine randomly at game start.

Offline Danou

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Re: Give the AI a voice
« Reply #9 on: May 13, 2012, 03:33:07 PM »
1. Tech plan -> What is tech plan in your opinion? Tech upgrades or something else?
For me 'Tech plan' is this (I take your examples from above):
- BO, like T1 start or T2-sniper-HMG etc.
AND
- Custom personality, like T1-T3 start, T2-T4 start, fast vehicles, some links to CT, etc.
AND
- Doctrine (I think it also belongs to it even if it's choosen randomly like you said)

I think it's not necessary to tell what upgrades it buys, except if it's already integrated in the personality anyway. Also, 'T1-T3 start' could be not precise enough for some noobs like me. For US it means fast M8? or does it mean BARs and ATguns? That's a big difference.

The purpose of this AI 'Tech plan' should be to help the human player to plan his own BO and strategy. If AI says it goes 'fast vehicle', then the human should probably tech to ATguns and heavy INF, etc.

Btw. did you see that message from Otto:
Quote from: Otto Halfhand
I have noted that other players with the right Tecno-Savvy can eavesdrop on your battle screen. [...] What this means is your Opponent could see all those nifty messages [...]

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: Give the AI a voice
« Reply #10 on: May 13, 2012, 04:14:26 PM »
Fast vehicles for soviets means fast t90 and other vehicles in that pool ;).

Yes i saw his message see example at the end of post :).
I think we will need to make this on/off so some players that don't like it can turn it off. I think it should be off by default and you can turn it on when you like.

Example how this should work:
Team1: Danou, sov AI
Team2: me, PE AI

So you are only able to see messages from your team mates and you can't see messages from my team mate in this case PE AI. Am able to see only messages from PE AI and i can't see messages from your teammate (sov AI).
Message can be displayed only to 1 player not to all ;).
But there is a little problem we will need all those messages translated to all languages that EF supports so am not sure that everyone will agree to accept this idea. But for tests we can have English only.

More Simple:
It should work like chat that is already in game you can only see messages from you teammates and you can't see what other team is planing. (In chat that is already in game you can send message to all or only to your team this should work without send to all option).

Hope it helps.
« Last Edit: May 13, 2012, 04:33:59 PM by jojorabbit »

Offline Otto Halfhand

  • Donor
  • Mr. Spam
  • *
  • Posts: 1166
    • View Profile
Re: Give the AI a voice
« Reply #11 on: May 13, 2012, 04:35:10 PM »
Perhaps what Danou is looking for here is advice as to what to build next? It should be possible to ping for help and have the AI give the list or top 2 or three Squads from its unit production choice list. This may be a Relic option rather then one that EF_mod can implement. IDK if any mod can change the Battle Screen GUI.  The potential advantage it would give the EF MP player online is too great to be vCoH compatible.

@ Danou: I am PA Dutch  which comes from 17th century High German. The grammar is such that PA Dutch use prepositions at the beginning and end of sentences. Now I do this all the time (i think "now" is probably a preposition. IDK I'm a fucking engineer not an English major). When people say they do'nt understand me I have learned to suggest that they strike the grammatically incorrect use of prepositions from the beginning and end of my sentences.The result is frequently increased comrehension on the part of the reader.

Edit" Danou You seem to have a good grounding in AI matters. Perhaps you have done some mods before. I invite you to join inthe discussion in Main AI thread. I think you can make some solid contributions there.
« Last Edit: May 13, 2012, 04:52:40 PM by Otto Halfhand »
孫 The
EF_v1.7.10
子 Art
Illegitimi non Carborundum -"Vinegar" Joe Stilwell
兵 of
Sun Tzu says: In warfare one compels and is not compelled by others
法 War

Offline IEatBolsheviks

  • Donor
  • Strelky
  • *
  • Posts: 57
    • View Profile
Re: Give the AI a voice
« Reply #12 on: May 13, 2012, 05:05:40 PM »
Build Orders (BO) is just a list with some units to make different starts like T1 start or T2-sniper-HMG etc.
Build orders can affect a lot of stuff i made a plugin for custom personality that allows us a lot of stuff like T1-T3 start, T2-T4 start, fast vehicles, some links to CT, etc. BO can be interrupted if AI gets too much damage or if BO is too long.
After BO is finished AI starts to calculate stuff.

I have tried just to give some random pings on map so i can confirm that AI can give you pings to attack, defend etc.
That means it would be possible to specify the opposing AI's strategy? Like 4ES / 4ER, piospam, 2IHT opening and such. I always wanted that.

The only problem would be the integration into the existing UI. Probably can't be done without resorting to an external window.

That also means the AI could give me tips. Like "You need AT NOW!!!!" :-)

Offline jojorabbit

  • Developer
  • Commissar
  • *
  • Posts: 481
    • View Profile
Re: Give the AI a voice
« Reply #13 on: May 13, 2012, 05:17:22 PM »
Quote
That means it would be possible to specify the opposing AI's strategy? Like 4ES / 4ER, piospam, 2IHT opening and such. I always wanted that.
Yes that makes different strategies/openings that AI can randomly choose right after game start. If you have any suggestions feel free to post them ;).


Quote
The only problem would be the integration into the existing UI. Probably can't be done without resorting to an external window.

That also means the AI could give me tips. Like "You need AT NOW!!!!" :-)
I don't plan to touch the UI i think it is against EF rules.
It does not mean that AI will teach you how to play(there is tutorial in game that gives you some instructions :) ) or that AI will give you orders build AT now, built t90 now, or similar. (No offence to anyone)

As far as i understood Danou wanted to get some info from allied AI player so he can adopt to AIs strategy. AI already sometimes(can't remember when) adopts to allied player strategy.
« Last Edit: May 13, 2012, 05:29:34 PM by jojorabbit »

Offline Danou

  • Ingenery
  • *
  • Posts: 9
    • View Profile
Re: Give the AI a voice
« Reply #14 on: May 13, 2012, 06:13:46 PM »
Quote from: jojorabbit
But there is a little problem we will need all those messages translated to all languages that EF supports so am not sure that everyone will agree to accept this idea. But for tests we can have English only.
Yeah, this could be a problem.

Quote from: Otto Halfhand
Perhaps what Danou is looking for here is advice as to what to build next? [...]
When i was reading the EF forum about jojo's AI improvements I thought: he must be using some sort of 'print to debug' / 'write to console' to check if the AI does what he wants. Then I thought: hey why not use the chat system to tell to the player what the AI is doing, could be helpful.

Quote from: jojorabbit
As far as i understood Danou wanted to get some info from allied AI player so he can adopt to AIs strategy.
Yes exactly, this was what I thought could be the most useful for an allied player, so I came up with this idea.
However, I do not have a fixed idea what exactly the AI should tell. It's maybe not that useful? I don't know.

Quote from: jojorabbit
AI already sometimes(can't remember when) adopts to allied player strategy.
Interesting, I didn't know that.
« Last Edit: May 13, 2012, 06:17:24 PM by Danou »