Are you, in fact, a pregnant lady who lives in the apartment next door to Superdeath's parents? - Commodore

Create an account  

 
AI research

Completed the new AI research procedure.

Goals :
-Research spells in the same research cost tier first (commons, then uncommons, then rares etc)
-Some exceptional spells can be allowed to be researched one tier earlier
-Spells the AI can never use are delayed by a tier
-Avoid researching redundant spells - if a spell with the same functionality is already known, delay all other such spells until the end of the current tier, or in some cases the end of the next tier.
-In general, get an overland summon first in each tier, then some of the best combat spells then everything else.
-Deterministic research - no random chance involved, the AI always picks the "best" spell. In case of ties, the first one found, so identical ratings should be avoided as much as possible
-Take advantage of the guaranteed turn 1 uncommon research choices where applicable (Stream of Life, Astral Gate, Aura of Majesty, Gargoyles, Werewolves, Giant Spiders)

Algorithm :
First, get the priority value assigned to the spell, then apply all modifiers. Finally, pick the spell with the LOWEST total.

Assigned priority numbers for spells in increasing order (so spells are ordered in the order of research) - the number at front is the priority, the one in the back is the spell's ID.


Code:
0    None                                                
0    Magic Spirit C9                                      
0    Spell of Return D6                                  
10    Giant Spiders 0E                                    
20    Lycanthropy AD                                      
22    Gargoyles 5F                                        
25    Sprites  9                                          
27    Skeletons A1                                        
30    Heavenly Light 8B - >80                              
31    War Bears 6                                        
32    Ghouls A6                                            
33    Nagas 31                                            
34    Hell Hounds 54                                      
35    Fire Bolt 53                                        
36    Fire Elemental 5A                                    
37    Black Sleep A5                                      
38    Nature's Eye 3                                  
39    Darkness A9                                          
40    Confusion 2E                                        
45    Call Centaurs 4                                  
50    Healing 7D                                          
60    Web 5                                              
65    Aura of Majesty 3B                                  
70    Shatter 58                                          
80    Wraith Form B5 ->A8                                  
85    Fairy Dust 7                                    
90    Heroism 82                                          
92    Holy Armor 7E                                        
93    Resist Magic 29                                      
94    Bless 79                                            
95    Just Cause 7F                                        
97    Holy Weapon 7C                                      
100    Life Drain A7                                        
105    AEther Sparks 2A                      
107    Earth to Mud 1                                      
110    Endurance 7B                                        
115    Summoning Circle CB                                  
120    Focus Magic 2F                                      
122    Astral Gate 8B                                      
124    Planar Travel 8A                                    
126    Stream of Life 94 -> 84                              
130    Guardian Wind 2C                                    
135    Warp Wood 51                                        
140    Land Link 10                                        
150    Wall of Fire 57                                      
160    Raise Volcano 62                                    
170    Corruption 55                                        
180    Chaos Channels 5D                                    
180    Fireball 60                                          
190    Flame Blade 5E                                      
210    Cloak of Fear A4                                    
215    Disrupt 52                                          
220    Mana Leak AA                                        
230    Phantom Warriors 2D                                  
240    Summon Zombies A3                                
250    Psionic Blast 32                                    
260    Star Fires 7A                                        
270    Warp Creature 59                                    
280    Dispel Magic CA                                      
290    Resist Elements 2                                  
300    Eldritch Weapon 56                                  
310    Weakness A2                                          
320    Guardian Spirit 81                                  
460    !!!Heroic Shout CD                                  
470    Floating Island 2B                                  
480    Water Walking 8                                    
500    Lightning Bolt 5B                                    
505    Possession AC                                        
510    Reaper Slash B1                                      
515    New : Syphon Life AF                                
520    Ice Bolt 0D                                          
530    Fire Storm 6B->61                                    
540    Prayer 8C                                            
550    Divine Order 87                                  
555    Transmute 12                                        
560    Black Prayer AE                                      
570    Night Stalker B0                                    
580    Fire Giant 5C                                        
590    Shadow Demons B4                                    
592    Chimeras 64                                          
595    Unicorns 88                                          
600    Cockatrices 11                                      
602    Summon Hero D0                                      
605    Basilisk 14                                          
610    Aether Binding 39                                
615    Cracks Call 0B                                      
617    Construct Catapult 0C                                
620    Famine BD                                            
622    Flight 38                                            
623    True Sight 83                                        
624    Drain Power AB                                      
625    Vertigo 35                                          
628    Immolation 63                                        
630    Blur 33                                              
640    Dispelling Wave 34                
650    Wall of Darkness B2                                  
660    Phantom Beast 3C                                    
665    Change Terrain 0F                                    
670    Blood Lust B3                                        
680    Spell Blast 3A                                      
690    Raise Dead 89                                        
700    Spell Lock 36                                        
710    Counter Magic 30                                    
720    Exorcise 86                                      
722    Warp Node BA                                        
725    Elemental Armor 15                                  
730    Disenchant Area CC                                  
740    Resurrection 85                                      
970    Enchant Item CF                                      
975    Detect Magic CE                                      
980    Earth Lore 0A                                        
990    Enchant Road 37                                      
994    Move Fortress 1C ->D1                                
995    Nature's Cures 13                                    
1000    Tranquility 9D                                      
1005    Pestilence C4                                        
1010    Flame Strike 6D                                      
1020    Wave of Despair BB                                  
1025    Djinn 47                                            
1030    Doom Mastery 75 ->6C                                
1040    Incarnation 8E                                      
1050    Wraiths B8                                          
1060    Doom Bat 61 ->6B                                    
1070    Storm Giant 41                                      
1080    Efreet 6A                                            
1090    Gorgons 1B                                          
1100    Stone Giant 17                                      
1110    Angel 93                                            
1120    Chaos Spawn 67                                      
1122    Armageddon 78                                        
1125    Survival Instinct 1C                                
1126    Clairvoyance 22                                  
1127    Invisiblity 3E                                      
1129    Summon Champion D4                                  
1130    Cloud of Shadow B9                                  
1135    Dark Rituals A3 -> BE                                
1136    Flying Fortress 4D ->46                              
1137    Banish 40                                            
1140    Uranus Blessing 3D                      
1145    Petrify 16                                          
1147    Mind Storm 43                                        
1150    Earth Gate 25                                        
1160    Gaia's Blessing 1D                                  
1170    Inspirations 98 -> 90                                
1180    Altar of Battle 92                                  
1185    Lionheart 8D                                        
1190    Prosperity 91                                        
1200    Zombie Mastery BC                                    
1210    Wind Walking 3F                                      
1215    Air Elemental 42                                    
1220    Invulnerability 8F                                  
1230    Magic Immunity 45                                    
1240    Doom Bolt 68                                        
1245    Wrack B6                                            
1250    Warp Lightning 65                                    
1260    Iron Skin 18                                        
1270    Earth Elemental 1E                                  
1280    Earthquake 1A                                        
1285    Terror A8 -> B5                                      
1287    Holy Word 96                                        
1290    Chaos Rift 6E                                        
1300    Evil Presence B7                                    
1320    Metal Fires 66                                      
1330    Magic Vortex 69                                      
1340    Exaltation 84 -> 94                              
1350    Stasis 44                                            
1360    Blizzard 19                                          
1370    Mass Healing 95                                      
1380    Disjunction D2                                      
1390    Create Artifact D3                                  
1400    Consecration 9B                                      
1500    Sky Drake 4E                                        
1510    Demon Lord C8                                        
1520    Great Drake 76                                      
1530    Colossus 24                                          
1540    Great Wyrm 27                                        
1550    Death Knights C1                                    
1560    Arch Angel 9F                                        
1570    Behemoth 20                                          
1580    Hydra 6F                                            
1600    Spell Binding 4C                                    
1610    Suppress Magic 4F                                    
1620    Doomsday 72                                    
1640    Life Force 9C                                        
1660    Charm of Life A0                                    
1670    Crusade 9E                                          
1680    Evil Omens C6                                        
1690    Eternal Night C5                                    
1700    Final Wave C7                                        
1705    Apocalypse 73                                        
1710    Massacre C2                                      
1711    High Prayer 97                                      
1712    Animate Dead C3                                      
1715    Call Lightning 23                                    
1716    Entangle 21                                          
1720    Annihilate C0                                    
1730    Spell Ward 48                                        
1740    Mass Invisibility 4A                                
1760    Call the Void 77                                    
1770    Disintegrate 70                                      
1790    Supreme Light 98                    
1795    Holy Arms 9A                                        
1796    Time Stop 50                                        
1800    Call to Arms 99                                      
1810    Chaos Surge 74                                      
1820    Warp Reality 6C -> 75                                
1830    Meteor Storm 71                                      
1840    Herb Mastery 26                                      
1850    Regeneration 1F                                      
1860    Nature's Wrath 28                                    
1870    Great Unsummoning 4B                                
1880    Haste 46 ->4D                                        
1890    Summon Demon BF                                  
1900    Creature Binding 49                                  
5000    Spell of Mastery D5                                  


Modifiers :

Code:
; Low tier Summoning Spell already known!
; +400 to other low tier summons
; Lycanthropy,War Bears,Sprites,Giant Spiders,Nagas,Hell Hounds,Gargoyles,Guardian Spirit,Unicorns,Skeletons,Ghouls

; If not Wraith Form, Water Walking or Floating Island, priority of those -500

; Weak combat direct damage +400 if weak or strong combat direct damage spell already known
; Fairy Dust    Ice Bolt    Fire Bolt    Fireball    Life Drain

; Weak combat unit curse +200 if another weak combat unit curse already known
; Black Sleep    Vertigo    Shatter    Warp Creature    Weakness

; Weak combat summon +400 if another weak combat summon already known
; Call Centaurs    Construct Catapult    Phantom Warriors    Fire Elemental    Summon Zombie

; Land Link, -100 if Giant Spiders known

; Lycanthropy, Giant Spiders, Gargoyles +150 if one of them known, or past turn 75

; Corruption +800 if Raise Volcano known

; Warp Wood +500 if Guardian Wind

; Darkness +900 if no Ghouls, Werewolves, Shadow Demons known

; UC or better high quality combat spells - these are generally prioritized high within their rarity tier.
; Priority +400 if no contact with the human, +100 if no hostility with the human. Combat spells cannot be used VS AI players!
; Note that this generally does not cover weak combat spells (already researching late), and does not cover very rares (the AI has to be prepared by then for war at any time)
; Group 9, 24, 59, 70, 12

; Planar Travel +800 if Astral Gate already known

; Divine Order +400 if at least two Chaos or Death books

; Group 25, +200 if Group 25, 32 known (equal or better summons)
; Group 32, +200 if Group 32 known
; Group 25 = Cockatrices    Fire Giant    Night Stalker    Summon Hero
; Group 32 = Basilisk    Stone Giant    Chimeras    Chaos Spawn    Angel    Shadow Demons

; Group 32 summons, +350 if even higher tier summons are known

; Cockatrices set to 145 if Focus Magic is known

; Blood Lust set to 21 is Werewolves known

; True Sight +500 if human player 0 Sorcery books - doesn't help against other AI!

; Group 56 +400 if Group 74,78 or 56 known
; Strong summoning spells, +400 if one of them or a better one already known
; Gorgons    Storm Giant    Efreet    Incarnation    Wraiths    Doom Bat

; Very rare summoning spells
; +500 if one already known

; Artificier prefer Create Artifact

; All overland curses +300 if Peaceful or Lawful
; (spell blast, famine, evil presence, pestilence, call the void, earthquake, corruption, fire storm etc)

; Earthquake, Chaos rift, priority to 1128 (earlier) if Ruthless or Maniacal

; If combat only spell and casting skill<spell cost-10, add 2000

That's all, let me know if you think the AI should do something in a different order!

The system will be included in the next experimental version.
Reply

I pushed up Call the Void to 1247 and Spell Ward to 1246, making them one of the few very rares the AI will go for even before finishing rares (but after the strong rares anyway).

I believe both are powerful enough spells to be worth getting early, and Ward has a low research cost for a very rare.
Aside from these two the list is incorporated into EXP3 exactly as posted. Suggestions on improvements are still welcome, especially if you observe an AI getting into a bad situation for neglecting to research a spell they could have in an actual game.
Reply

I'm trying to avoid this topic too much, as I'm very biased - my gameplay is commons -> very rares -> whatever else I'm stuck with. So I would literally skip all the uncommons and rares if I could. (Obviously, I've never done the 'upgrade' spells from lairs tactic.)

I do hope other people comment on this.
Reply

Quote: commons -> very rares

How does that even work? Very rares don't appear until you finish all your uncommons and rares except the last few.
...oh, I guess very low books can do that. You don't get much very rares out of that though.
Reply

Of course not. And yeah when I play more books, I pick up what ever the cheapest spells I can to research into the very rares show up. Occasionally something else matters like Lionheart or magic immunity, but I find its more effective to pour the power into research and go straight for the very rares - like why bother summoning wraiths if you're going to get death knights or demon lords? I never have enough skill by that time to summon enough wraiths to singlehandedly win a war; so any wars I'm in right when I get wraiths will be won regardless of the wraiths. If I don't bother with a whole bunch of power dedicated to half a dozen or more wraiths, I can get a very rare summon researched in 20 turns; and 1 very rare death summon does singlehandledly win wars.
Reply

Breaking down the above to an order per realm after applying all special rules, we get - assuming the next spell on the list always appears as a valid pick at the correct timing, assuming the AI never delays a combat spell for not being at war with the human, and assuming the AI has enough books to get all 40 spells and none of the personality modifiers delay or speed up the research of curses :

Life
Heavenly Light
Healing
Heroism
Holy Armor
Bless
Just Cause
Holy Weapon
Endurance
Astral Gate
(Planar Travel delayed because Astral Gate known already)
Stream of Life
Star Fires
Guardian Spirit
Prayer
Divine Order
(Unicorns delayed because Guardian Spirit known already)
True Sight
Raise Dead
Exorcise
Resurrection
Planar Travel
Unicorns
Enlightenment (It won't show up any earlier then this anyway)
Incarnation (prioritize so it can gain EXP)
Angel
Inspirations
Altar of Battle
Lionheart
Prosperity
Invulnerability
Holy Word
Exaltation
Mass Healing
Consecration (cheap to research, important to get before enemy very rares start to hit cities - maybe this should be even earlier?)
Arch Angel (always get summon first in each tier - but this costs 8k!)
Life Force (more power - helps even at peace)
Charm of Life (strongest military spell - can be cast before war - but costs 8k!)
Crusade (same, also costs 8k!)
High Prayer (amazing combat spell that would be worth first pick but the previous spells are even stronger)
Supreme Light (extremely powerful in some battles and only costs 4k to research - maybe should be earlier? Regenerates Arch Angels!)
Holy Arms
Call to Arms

I think this is about right but I'm uncertain about the order of very rares, especially as it starts with the more expensive spells. Consecration and Supreme Light could be moved up?

Nature
Water Walking (but usually starting pick or if other water spell known, delayed research)
Giant Spiders (rush research if able)
(Sprites delayed if Spiders known but is starting pick usually)
(War Bears delayed if Spiders known but is starting pick usually)
Nature's Eye (research bonus early!)
Land Link here is Spiders known
Call Centaurs
Web
Fairy Dust
Earth to Mud
Land Link
Resist Elements
Sprites (if delayed earlier)
War Bears (if delayed earlier)
Water Walking (if delayed earlier)
(Ice Bolt delayed, Fairy Dust already known)
Transmute
Cockatrices
Great Lizard
Crack's Call
(Construct Catapult delayed, Call Centaurs known)
Change Terrain
Elemental Armor
Ice Bolt
Earth Lore (AI cannot use)
Nature's Cures (AI cannot use)
Construct Catapult
Gorgons
(Stone Giant delayed, better summons already known)
Survival Instinct
Clairvoyance (cheap research very rare that boosts power)
Petrify
Earth Gate (another cheap res. VR)
Gaia's Blessing
Iron Skin
Earth Elemental
Earthquake
Stone Giant
Blizzard
Colossus
(Great Wyrm delayed, Colossus already known)
(Behemoth delayed, Colossus already known)
Call Lightning
Entangle
Herb Mastery
Regeneration
Nature's Wrath (Triggers wars, hurts other AI, bad to do it too early)
Great Wyrm
Behemoth

Chaos
Gargoyles (if available, rush research)
Hell Hounds (delay if Gargoyles)
Fire Bolt
Fire Elemental
Shatter
War Wood
Wall of Fire
Raise Volcano
(Corruption, delay because Raise Volcano)
(Fireball delay, Fire Bolt known)
Flame Blade
Disrupt
(Warp Creature, delay, Shatter known)
Eldritch Weapon
Hell Hounds
Warp Creature
Lightning Bolt
Fire Storm
Fireball
Fire Giant
Chimeras
Immolation (maybe this should be earlier if Gargoyles known?)
Corruption
Flame Strike
Doom Mastery
Doom Bat
(Efreet delayed because Doom Bat)
(Chaos Spawn delayed because Chimeras)
Armageddon (if by chance it appears early, research it - boosts power massively over time)
Doom Bolt
Call the Void (game winning spell, especially if appears early, and works even on other AI)
Warp Lightning
Chaos Rift
Chaos Spawn
Metal Fires
Magic Vortex
Efreet
Great Drake
(Hydra delayed, Great Drake known)
Doomsday (We already did Armageddon, Call the Void and Great Drake, no need to hold back now)
Apocalypse
Disintegrate
Chaos Surge
Warp Reality
Meteor Storm (generally damages other AI much more than the human player, tends to help the human player indirectly unless the caster is the only strong AI left - best to leave it last where that scenario is more likely)
Hydra

Similar to Life, all the expensive very rares are at the top. They are definitely worth it here, though.

Sorcery
Nagas
Confusion
Aura of Majesty
Resist Magic
AEther Sparks
Focus Magic
Guardian Wind
Phantom Warriors
Psionic Blast
Floating Island
AEther Binding
Flight
Vertigo
Blur
Dispelling Wave
Phantom Beast
Spell Blast
Spell Lock
Counter Magic
Conjure Roads (AI cannot use)
Djinn (cheap powerful VR creature - get early if able)
(Storm Giant delayed because Djinn)
Invisibility
Flying Fortress
Banish
Uranus' Blessing
Mind Storm
Wind Walking
Air Elemental
Magic Immunity
Spell Ward
Stasis
Storm Giant
(Sky Drake delayed because Djinn)
Spell Binding (this wins games)
Suppress Magic (this too)
Mass Invisibility
Time Stop (best spell in game but costs tens of thousands of mana so better not to do first)
Great Unsummoning
Haste (AI isn't that good at using this)
Creature Binding (probably least useful very rare in the game)
Sky Drake

Death
Wraith Form (but usually starting pick, delay if other water spell)
Lycanthropy (rush it if available)
Blood Lust if Lycanthropy
(Skeletons delayed by Lyc)
(Ghouls delayed by Lyc)
Black Sleep
Darkness
Wraith Form
Life Drain
Cloak of Fear
Mana Leak
Summon Zombie
(Weakness delayed, Black Sleep known)
Skeletons
Ghouls
Possession
Weakness
Reaper Slash
Syphon Life
Black Prayer
Night Stalker
Shadow Demons
Famine
Drain Power
Wall of Darkness
Blood Lust
Warp node
Pestilence (game winning spell if hits too early, prioritize)
Wave of Despair
Wraiths
Cloud of Shadow
Dark Rituals
Zombie Mastery
Wrack
Terror
Evil Presence
Demon Lord
(Death Knights delayed because Demon Lord)
Evil Omens
Eternal Night
Final Wave (better after EN)
Massacre (better after EN)
Animate Dead (reuse those Demon Lords)
Annihilate
Summon Demon
Death Knights
Reply



Forum Jump: