Off-topic: AI and reinforcement learning

Off-topic:

Brad, have you considered contacting Google's DeepMind for clues about bettering the AI. 

As you probably have heard, a company under Google, DeepMind, has developed algorithms, which can receive as input "screenshots" of Atari games e.g. pixels, and play the Atari game. The algorithm can further learn from its experiences and better it itself. 

For example a youtube video shows how DeepMind are getting better at Breakout. 

Article from Nature

http://www.nature.com/nature/journal/v518/n7540/full/nature14236.html

Article from Wired

http://www.wired.com/2015/02/google-ai-plays-atari-like-pros/

 

Maybe you can make the AI on insane better. Hopefully the AI on easy will still be easy. 

 

You could also implement an option in SK, where the player can contribute the result of the AI learning from the play sessions, and collect it a server at Stardock. From this server, an update/patch can be sent to update the AI of SK.

 

edit: Added the off-topic label

29,049 views 5 replies
Reply #1 Top

Isn't this the point of the Dungeon Master system being built into SK? To receive feedback on tried tactics and based on that improve the AI?

Reply #2 Top

I do some work in AI and RL. The specific approach used by DeepMind and others on the Atari games (based on deep neural networks) wouldn't scale to a game like SK, there are too many states to consider. There has been some research done applying RL to 4X games though, e.g. http://people.csail.mit.edu/camato/publications/LearningInCiv-final.pdf talks about using it with Civ IV. 

The approach you describe above where the AI learns from observed human sessions is closer to a related idea called apprenticeship learning, i.e. http://ai.stanford.edu/~ang/papers/icml04-apprentice.pdf. The main difference is that RL learns from AI-controlled playthroughs that are initially pretty random but evolve to maximize some pre-defined "score", where as apprenticeship learning learns what score humans are implicitly trying to maximize, so it's better suited to more complex scenarios where describing good play to the AI is difficult. 

To Heavenfall, as I understand it the DM isn't learning from the player as such, but is deciding what fixed tactics to use based on what the player does. I don't believe it's capable of developing anything truly novel. This is just a guess though, Brad would know better than I do. 

 

 

Reply #3 Top

Quoting pi_guy, reply 2

The approach you describe above where the AI learns from observed human sessions is closer to a related idea called apprenticeship learning, i.e. http://ai.stanford.edu/~ang/papers/icml04-apprentice.pdf. The main difference is that RL learns from AI-controlled playthroughs that are initially pretty random but evolve to maximize some pre-defined "score", where as apprenticeship learning learns what score humans are implicitly trying to maximize, so it's better suited to more complex scenarios where describing good play to the AI is difficult. 
End of pi_guy's quote

From what I understand of DeepMind (and without having read the Nature-article, or your articles) the computer plays the itself, determines a score, and plays the game again, altering tactics etc. to optimize the score. The good things e.g. tactics improving the score, are used in future played games.

 

I do not believe the DM is capable of learning or at least it is limited to the current. DeepMind is capable of learning over multiple games.

Reply #4 Top

Yup, that's the gist. When you can easily describe to the computer what good play is (maximizing the score from the Atari game), RL is an option. If that's hard to do (say, teaching a computer to fly a helicopter) apprenticeship learning might be better. 

Reply #5 Top

So Brad should teach the AI or Dungeon Master to minimize the number of turns to slaughter the player with some constraints.

The constraints could be:

- may not happen before turn 100

- the threat level must be at least 3

- player controls 90% of the shards

 

The strategy could be:

- build strongholds near the shards,

- build strongholds or smaller lairs from the SK fortress to the shards e.g. prevent the player from building siege towers in front at SK's door

- combine armies to comprise at least two higher level units (fallen enchantress, these shadow things, juggernauts, umberdroughs)

- research spells aimed at destroying the enemy, stop playing around and just kill the heroes (if the SK actually do this)

- craft/use items etc.

 

For tactical combat, the strategic goal is to end the combat in as few turns as possible with as few casualties as possible. Alternatively the combat should be won with only the less valued/cheap units being killed/sacrificed. Even the SK should value strong units in order to level them up 

- cast spells which target units for damage for the kill (if possible), reduce initiative, reduce movement

- - ranged units

- - fast units

- - strong melee units which can close the gap pretty fast e.g. Drogon

- - units with skills

- - level up units to an appropriate level depending on the players progress

 

- position melee units to target 

- - weak melee units, if the unit can be killed

- - strong melee unit if the unit can kill one of your units

- - for protection of valued units e.g. ZOC

- attack units

 

- use skills:

- improve initiative,

- improve attack,

- reduce enemy initiative

 

Furthermore the Lieutenants should be kept within the SK Fortress the first 10 turns, after which they should roam the world looking for trouble and stomping down rebellion and irritating small wannabe empires (player, allies), looking for "allies" / slave nations.

The Lieutenants should be expanded to include more units. One Lieutenant could be magic user type, another one could be a dark Flying Dragon (storm/ash Dragon etc. Abrasix) with high spell and elemental resistance. Then you have the two melee Lieutenants, Vetrar and red Devil/demon-thingie.  

The army accompanying the Lieutenants should also be bigger and more themed to each Lieutenant. For example the Demon-thingie could have these shadow assasin, which can spawn other demons or Fire elemental. Vetrar should have zombie Dwarfe-beserker. Magic Lieutenant should have Fallen Enchantress with sacrifice units spells and a lot of darklings/urxen as fodder, while the Dragon could have a couple of drakes and other Storm dragons.