View topic - NOE AI - development, ideas, manual


All times are UTC + 1 hour


Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 08 Jun 2012, 13:35 
User avatar

Joined: 03 Jun 2010, 00:28
Here it is, after 80 days of hard work im glad i can introduce the NOE AI 8).

N.O.E. - AI

= ingame lua AI for standard skirmish game primary for NOTA
= set of tools that is used for SP/COOP campaing and missions

current version: beta (donwload nota 1.79a (revision 20x))
current status: AI can kill noobs and honestly face other players :).
last revision changed NOE: check on project site
used in missions: TTD, xants-pd
the greatest enemies: NOTA module for SHARD AI, PepeAmpere

WIKI and MANUAL

http://code.google.com/p/nota/wiki/NOE_introduction

[+] FEATURES

- independent agent system, commanding struncture (group, supergroup, brain)
- modules - formations, groups, spirit programs can be easily redefined
- more then 10 formations
- speedable
- inteligent building system (buildmapping)
- strategic mapping
- graphic debug mode

[-] KNOWN ISSUES, NOT FINISHED FEATURES

!! AI is not fair, knows everything
! no difference between EASY, MEDIUM, HARD yet
! up to 16x16 map, max 3 AIs in 3 different is possible to have on map (with all speedups ON), bigger amount of AIs lag... 28x28 map can run with 2 AIs
! no advanced tactics for all attack groups (advanced things not implemented), they are able only gather and attack in one choosen formation, only main Thud/Hammer battlegroup is able to do some advanced things
! no use of tech2 now
! not possible play on map, that have not classic metal spots
! no big difference in tactics of ARM and CORE (expect snipers, morties, levelers) and some group counts
! only two clone brains Thor (CORE), Cake (ARM), very few special features implemented yet, no special tactics yet, Morphdog planed too
! not metalmaker controler now
! buildSpots are choosen quite clever, but no spacing around geo spots and factories (mexes spots ok)
! NOE AI is not able to start in the middle of the sea, needs some dry land around
! not using users def files for creating own AIs setup
! not using, not finished Spectator learing widget
! taking of AI stuff not possible

TECHNICAL INFO

this moved on own N.O.E. wiki, placed on project site

NOE GAME OPTIONS

- mapping coef - (0.5 -4, def 1.0) - current simple speeding of AI mapping, 0.5 is for 1v1 game on small map (AI thinks faster), bigger maps needs bigger value.
- splited mapping - TRUE/FALSE (def: TRUE) - if TRUE, every AI team gets own frames for counting strategic mapping, good for many AI teams on medium and big maps (or then LAG)
- frames for agent - (4-60, def: 10) - how many frames are needed for making decisions, 4 is ok almost in every situtation, with 10 or more no problems

NOE AI DEBUG MODE

- you can use some shortcuts to see some graphic representation of AI mapping tables. Some of them are not used, some of them tell you nothing, if you dont know it, but safeIndex table and build spots tables are quite easy to understand... :-)

ALT + D - showing holdPower table
ALT + E - showing holdZero table
ALT + F - showing present table
ALT + R - showing safeIndex table
ALT+ Q - showing best 2-10 safe positions on the map (OFF now)
ALT + H - showing tile height map
ALT + M - showing metal spots map
ALT + A - showing build spots map


Image

Image

NOE FORMATIONS

Tactical groups are able to use formations. Such things are defined in file noe_formations.lua, some of them automaticly generated and rotated (if its rotable formation).

Current defined formations are (bold most used):

- hexagon
- box
- arrow
- swarm
- standardLine
- standardLine2nd (for Pepes thuds/hammers line zigzagin' ;) )
- smallLine
- doubleColumn
- seaUnit (not used)
- artyLine
- wedge

Image

.... more info i add later

MODIFIING AI - mission way (not finished description)

What is needed to set up correctly for new mission (draft)

Here are some conditions, that need to observed for clean work of your mission. Most of them you dont brake by mistake, but if broken, usally the bug is here:

  • have missions folder in game folder
  • in that folder missions have folder with mission that i will call <mission_name>
  • names of AI from missions/<mission_name>/settings.lua, missionInfo.AInames table need to be the same names that are in:
    ..- missions/<mission_name>/AIdef/side.lua newSideSettings table (on first level)
    ..- gamefile - LuaRules/config/noe/noe_side.lua sideSettings table (on first level)
  • names of battlegroups listed in missions/<mission_name>/AIdef/side.lua table (on second level, these simple strings) have to be the same names you can find in:
    ..- missions/<mission_name>/AIdef/groups.lua newGroupDef table (name)
    ..- gamefile - LuaRules/config/noe/noe_groups.lua groupDef table (name)
  • groups defined in missions/<mission_name>/AIdef/groups.lua have to had the names of spirits listed in:
    ..- missions/<mission_name>/AIdef/spirits.lua newSpiritDef table
    ..- gamefile - LuaRules/config/noe/noe_spirits.lua spiritDef table
    and these spirits (if users custom) need to have defined one formation in:
    ..- missions/<mission_name>/AIdef/formations.lua newFormationBySpirit table
    ..- gamefile - LuaRules/config/noe/noe_formations.lua formationBySpirit table
  • plans used in spirits have to had the same names used in
    ..- missions/<mission_name>/AIdef/spirits.lua newPlan table
    ..- gamefile - LuaRules/config/noe/noe_spirits.lua plan table
  • use <mission_name> when launching a game in modoption "mission"
Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 21:25 
NOTA Developer
User avatar

Joined: 05 Mar 2006, 10:26
I was impressed the first time it sent a thud battleline at me. Keep up the good work!
Top
 Offline Profile  
 
PostPosted: 21 Jun 2012, 23:27 

Joined: 09 Sep 2007, 20:05
I played a game to check it out, seemed nice (im not used to nota)

started spamming this error after a while and it had a lot of stumpies idling front of labs for all ais

Code:
[f=0034910] Error: LuaRules::RunCallIn: error = 2, GameFrame, [string "LuaRules/Configs/noe/noe_spirits.lua"]:359: Invalid unitID given to GiveOrderToUnit()
stack traceback:
   [C]: in function 'spGiveOrderToUnit'
   [string "LuaRules/Configs/noe/noe_spirits.lua"]:359: in function '?'
   [string "LuaRules/Configs/noe/noe_spirits.lua"]:584: in function '?'
   [string "LuaRules/Gadgets/unit_noe.lua"]:1392: in function 'RunPlans'
   [string "LuaRules/Gadgets/unit_noe.lua"]:1524: in function 'GameFrame'
   [string "LuaRules/gadgets.lua"]:931: in function <[string "LuaRules/gadgets.lua"]:929>
   (tail call): ?


got this too after a while, im guessing from all the stumpies: in a bunch
Code:
[f=0100761] No space on the ground, says group: , 100
[f=0100761] No space on the ground, says group: , 100
[f=0100761] No space on the ground, says group: , 100
[f=0100761] No space on the ground, says group: , 100


I had globallos on and speed was at 3 btw
Top
 Offline Profile  
 
PostPosted: 22 Jun 2012, 03:09 
User avatar

Joined: 03 Jun 2010, 00:28
Thor: thank you, yes, formations should be thing that makes this AI unique a bit and enhances the feeling you are playing against dangerous enemy ;)

BaNA: yes, that alpha version had some quite really annoying bugs, one of them was ordering some dead units in special tactical groups. I think this problem is solved now, you can create own test file from last development version on project site and play. Just now, when i replay to you, current revision of nota has no. 36 and that alpha version had no. 31. Revisions 33 and 34 repaired a lot of mistakes and added a lot of new stuff and in current version there are new defence groups, enhanced behavior of territory capture and all units are used for warfare now, so no idle stumpies :).
Top
 Offline Profile  
 
PostPosted: 25 Jun 2012, 16:20 
User avatar

Joined: 03 Jun 2010, 00:28
new release - nota1.68c (revision 41)
enjoy :mrgreen:
Top
 Offline Profile  
 
PostPosted: 29 Jun 2012, 11:05 
User avatar

Joined: 03 Jun 2010, 00:28
new release, nota 1.68d (revision 43)

- AI knows ground tech2
- AI knows storages, llts and plasma batteries
- AI knows some late game special attack
- some speedups are default ON, some calculated automaticly
- many new battlegroups
Top
 Offline Profile  
 
PostPosted: 30 Jun 2012, 21:46 
User avatar

Joined: 30 May 2007, 09:45
Location: Latvia, Riga
You got me interested.

Pros:
  • Formations
  • Uses a variety of units in battlegroups including radars and jammers
  • Could quickly rebuild after having base decimated
  • [edit] retreats with battlegroups

Cons:
  • Lacks scouting(oh it knows everything? Does it have a threat map then?) and raiding attempts
  • A bit slow expansion
  • Considers long range artillery as an attack that requires units sent to defend
  • Not enough mobile AA or even doesn't care if the enemy has air or aircraft construction capabilities.
  • Main attack force ignores greater threat that is incoming on home base, although it might not have enough time to get there, but I doubt it calculated that. :P
  • On red triangle map, gets units stuck on shores when there are no enemy units on other islands.

Suggestions:
  • Add automatic factory facing to the center of map relative to starting position.

Well done PepeAmpere, with a few of these AIs it can be really chalenging(probably).


Attachments:
File comment: Demo
20120630_215923_EE-RiverGlade-v02_88.sdf [1.29 MiB]
Downloaded 59 times
Top
 Offline Profile  
 
PostPosted: 02 Jul 2012, 00:54 
User avatar

Joined: 03 Jun 2010, 00:28
Thy for reaction and reflexion. Here are some short answers for cons.

Pendrokar wrote:
  • Lacks scouting(oh it knows everything? Does it have a threat map then?) and raiding attempts


Yes, the second debug image (in first post) is one visualization from few threat maps that NOE keeps (in that example more green means more safe place).

Pendrokar wrote:
  • A bit slow expansion


Agreed, the expansion algorithm is more clever that the one in alpha version, but it is still very simple (i have not started work on the good one, yet). Now its only bucket sorted list of mexes (by distance from tower) which const. units groups tries to capture, no clever spread to the most close mex, yet.

Pendrokar wrote:
  • Considers long range artillery as an attack that requires units sent to defend


I dont get this point :) Artillery is usually defended by main battlegroup fighting nearby, only few times happen they face enemy alone (special cases, for example: attacking the hills, heavy loses of main battlegroup in short interval,...)

Pendrokar wrote:
  • Not enough mobile AA or even doesn't care if the enemy has air or aircraft construction capabilities.


Yes, only AA groups defined are support bot groups for main battlegroup (crashers/jethros), no vehicle AA, no tech2 AA, no fighters defined yet. Theres a problem cause these units have only special use and it needs a bit more clever buildmanagement then ground fight units. There was not time to do that, becouse the basic ground opponent for newbies was the first main task of this project.

Pendrokar wrote:
  • Main attack force ignores greater threat that is incoming on home base, although it might not have enough time to get there, but I doubt it calculated that. :P


There are few defending groups, more for ARM, that have only peewee/ak members, not looking for targets, only patroling now. No defence management implemented yet, all my efforts were pushed to show attack in alpha version.

Pendrokar wrote:
  • On red triangle map, gets units stuck on shores when there are no enemy units on other islands.


Red triangle is broken for NOTA all the time, its not matter of AI. Theres some problem with height callculation, so ships shoot to low for example.

Pendrokar wrote:
Suggestions:
  • Add automatic factory facing to the center of map relative to starting position.


Such widgets for AI can be created, but they are only kind of cosmetic changes. For near future theres planned defining most of the late techs, making first brains and preparing some clever usage of the hills.

Pendrokar wrote:
Well done PepeAmpere, with a few of these AIs it can be really chalenging(probably).


Current version suprises me that it doesnt use any clever mechanism (if i dont mean tech. part of mapping) and it works quite good on not much hilly or water maps. I was happy that 1.68b version was able to kill E323 AI in 1v1 fight (it was looking bad at start - E323 expand great, but big NOE groups were the winning factor) and the system i use is easy to be upgraded (you can check how the formations or groups are defined, adding new ones is as easy as a pie).

Adding own players/users group will be possible in the end of the summer, you will be able to define own AI groups (with user defined formations, spirits, stats,... or using my difinition and with changed only few numbers in group definiton).

If i will find the time for spectator learning widget, spectator will be able to learn AI which buildspots are clever choosen and such data will be used in next matches.
Top
 Offline Profile  
 
PostPosted: 03 Jul 2012, 12:25 

Joined: 04 May 2012, 15:05
WONDERFUL!, an AI that actually does human like mass attacks! One question, does it make up it's armies based on what you have, or does it just choose it's favourite units?
Top
 Offline Profile  
 
PostPosted: 03 Jul 2012, 14:38 
User avatar

Joined: 03 Jun 2010, 00:28
Conte_Vincero wrote:
WONDERFUL!, an AI that actually does human like mass attacks! One question, does it make up it's armies based on what you have, or does it just choose it's favourite units?


If it does such impression, thats good :-). It has prepared some buildlists (that are randomly choosen, yet) and there are so many sleeping battlegroups waiting for units now, that no unit stay idle when finished (i hope).
Top
 Offline Profile  
 
PostPosted: 03 Jul 2012, 15:36 

Joined: 09 Sep 2007, 20:05
I played with it again, quite nice, a lot of improvement. i was very impressed with performance, I played a 16 way ffa with the ais and it could run at 3* speed. I am not well versed in nota but i would def recommend a bit more t2 eco spamming and mex expanding for ai, i got my eco up much faster.
Top
 Offline Profile  
 
PostPosted: 03 Jul 2012, 17:44 
User avatar

Joined: 03 Jun 2010, 00:28
BaNa wrote:
I played with it again, quite nice, a lot of improvement. i was very impressed with performance, I played a 16 way ffa with the ais and it could run at 3* speed. I am not well versed in nota but i would def recommend a bit more t2 eco spamming and mex expanding for ai, i got my eco up much faster.


SPEED - yes, it behaves good, and if slow, you can change the AI speed options before game to get better result

TECH2 spamming - tech2 is never core of army in NOTA, tech1 are still main fighters in most of the games. Thats first reason, and second: it needs more attention (=much more clever AI), becouse it costs a lot and loosing tech2 means bad things for the player/AI. Tech2 was implemented week ago, so AI is not clever enough to push more resources into tech2.

EXPANDING - yes, the expanding part is still very simple and slower than other AIs do.
Top
 Offline Profile  
 
PostPosted: 04 Jul 2012, 15:23 

Joined: 04 May 2012, 15:05
Done some more games, and a few questions,
1. Does the AI use defensive buildings. I didn't see any which I find odd, as there was only mobile AA used
2. Does the AI use ships? again none seen, and the absence of defensive turrets allowed me to easily bombard their base
Top
 Offline Profile  
 
PostPosted: 04 Jul 2012, 17:47 
User avatar

Joined: 03 Jun 2010, 00:28
Conte_Vincero wrote:
Done some more games, and a few questions,
1. Does the AI use defensive buildings. I didn't see any which I find odd, as there was only mobile AA used
2. Does the AI use ships? again none seen, and the absence of defensive turrets allowed me to easily bombard their base


1) AI use few def buildings, but only in late game, if has a lot of metal. Its not odd, mobile units are more cost/battle_output effective

2) AI is not using ships now, not implemented yet. No defence turret helps you against navy, only your own navy can kill it 8).
Top
 Offline Profile  
 
PostPosted: 04 Jul 2012, 17:48 
User avatar

Joined: 03 Jun 2010, 00:28
new release, nota 1.68e (revision 45)

- AI knows air and def tech2 expansions, build airfighters, wings, napalms and nukes
- main battlegroup uses using more AA and advanced AA
- main tank attack brigade is using the same "keep formation" procedures as other groups now => tanks attacking in (own) formations, too
- many new battlegroups
- more airpads when AI goes air
- air using target attacking again
- AI knows mohobuilder and upgrades mines
Top
 Offline Profile  
 
PostPosted: 06 Jul 2012, 22:48 

Joined: 04 May 2012, 15:05
VERY NICE, the battle groups of Raptor IV's really caught me by surprise, One small problem, my ally won the game by building nukes, but the two enemies had completely failed to build missile defence (or nukes themselves) this could be due to the fact that the two enemies were exhausting all their resources on a titanic struggle against my defences, whereas the ally was just sitting back quietly doing their own thing. Also there was an absence of heavy mobile artillery which was the only thing that would have allowed them to crack my massive plasma batteries.
Top
 Offline Profile  
 
PostPosted: 07 Jul 2012, 10:29 

Joined: 09 Sep 2007, 20:05
I played some more games with it and it was very nice, i couldn't take 3 hard ais against me but could beat 2 of them. Played a few hueg 3v3v3v3v3vme ffas and one of them became very strong, sadly that was mainly reflected in the fact that his hammer group streched the map, not in any t2-t3 stuff.
Top
 Offline Profile  
 
PostPosted: 10 Jul 2012, 00:35 
User avatar

Joined: 03 Jun 2010, 00:28
Conte_Vincero wrote:
(...) but the two enemies had completely failed to build missile defence (or nukes themselves) this could be due to the fact that the two enemies were exhausting all their resources on a titanic struggle against my defences, whereas the ally was just sitting back quietly doing their own thing. Also there was an absence of heavy mobile artillery which was the only thing that would have allowed them to crack my massive plasma batteries.


1) AI doesnt know antinuke, yet, it knows only nukes now :)

2) Sometimes it happends, that some AI player doesnt build tech2 arty, but its really unussual

BaNa wrote:
I played some more games with it and it was very nice, i couldn't take 3 hard ais against me but could beat 2 of them. Played a few hueg 3v3v3v3v3vme ffas and one of them became very strong, sadly that was mainly reflected in the fact that his hammer group streched the map, not in any t2-t3 stuff.


Theres no brain yet, so parts of army are partly random and partly hardcoded. With brains (next task of my developement) AI will choose its developement in reaction on game situation - so for example more teching or airspam against turtle-like playing players.
Top
 Offline Profile  
 
PostPosted: 15 Sep 2012, 20:25 
User avatar

Joined: 03 Jun 2010, 00:28
some marks about news in 1.69

  • killed bug with skipping some tech2 building becouse hardcoded energy limits
  • main battlegroup secondary line now keep near primary line (no such crazy positions as before, far from fights)

some issues still not fixed

  • sleeping AI when not enough mexes at start around the base
  • new bug: sometimes energy stall when big metal income for AI in late game
Top
 Offline Profile  
 
PostPosted: 18 Sep 2012, 06:13 
Spring 1944 Developer
User avatar

Joined: 11 Oct 2005, 06:18
Location: Ukraine
I've seen one of AI's moho engineers reclaiming a mex while some other con unit (maybe the base) was repairing it. Effectively those 2 units got infinitely stuck and were using metal without doing anything useful.

Probably the mex was nearly completed when moho engineer decided to upgrade it, but I'm not 100% sure how exactly that happened (and have no replay).
Top
 Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 33 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Site layout created by Roflcopter et al.