• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Dec 19, 2001
698
0
Visit site
Neural networks:
Yes, they can learn.
No, they can't learn everything. At least not the ones I've seen.
No, they aren't intelligent, it just seems so because the results may look intelligent in a certain situation.

You can use them to train themself even without a trainer but you need to implement them fitting to your goals. If you miss something then the resulting network won't be able to learn according to a new situation.
Still you can provide the game with a good network to solve everything they designed and tested it for.
You can also combine a network with rule based algorithms.

BUT
It's very hard to design such a network.
The knowledge stored in network is very hard to locate. If you want to change something because you changed some of the game rules it may be a very hard task. It may even happen that you have to train this part of the network again.
The learning process itself is also not a trivial task.
How fast do you want the network to learn in game?
Very fast? Then the network will be a bit unstable. It may even learn to react to your bad moves. Then is has learned how to fight against a bad opponent. You may even trick the AI by behaving stupid for some turns and then switch back to smart moves and you`ll see how the AI has forgotten to react accordingly.
Very slow? The network will be stable and improve over time...but the learn effect will be rather low.

When and what should it learn?
Backpropagation needs some time in a bigger network but let's say we have small networks. What is the training data?
If I understand the posts above right you want the AI to learn from the human player. Now what exactly is the training data provided by the human player? Very very little each turn. Most of the time a single move doesn't make sense at all. A move belongs to a plan. You need to recognize the plan. The plan of a human player. Huh, very difficult.
You can do some pattern recognizing for that but given the small amount of data the outcome would be more or less fixed.


Neural networks were designed for reacting fast in a situation with overwhelming and/or incomplete information. If you want to train them while playing the game you need a data base big enough for learning something. Therefore you need to categorize each move within a given time-slize and judge whether these actions were succesful or not. Let's say you're supporting your ally while gaining nothing. Bad for you in the short run but maybe good for you in the long run.
So, even categorizing and determining whether something is succesful or not is a very difficult task.

You may have noticed that I used "reacting". Input->Output. Situation->Reaction.
Neural networks are good for reaction.
They cannot create a plan.

That's why you can use neural networks very good for letting individual units learn how to react to a certain situation. Then they are able to react better the next time. But this is very linear. You can learn from time-slize 1 to time-slize 2. Situation->Reaction. That's what they are made for.
You can teach a robot keep himslef balanced while moving. You can use them to learn the computer distinguish between a written "E" and a written "A" to automatically read your written transactions.
You can also use them to learn a CRT in EU. Let's say that no information about the strength of a cavalry unit for a certain tech level is provided. You can use a neural network to produce the results when it has enough battle fought. Which each battle the AI would be smarter to predict the outcome and thus avoiding loosing situations.

If you want the AI to create a plan to achieve a goal....distributed AI: agents are coming into my mind. Neural networks not.

For designing neural networks you still need a good understanding of what you want to do.
Here's an easy task for those who think that programming a "good" AI is an easy task:
Monopoly.
Everybody knows it and it seems to be an easy task to write an AI for it. Now write down a set of rules of how you think you are usually playing the game. Ask a friend to do the same. Then start a game where each of you is following only his own rules.
(I did it at university and we were alienated by our own rules)
At least when it comes to decide whether a trade of money/streets vs. cards/streets should be done you'll be surprised how stupid your set of rules is. You have forgotten something. Rewrite your rules and start the game again. Creating and offering a certain trade is even more difficult.
Again you'll be surprized how bad the AI is. Your own set of rules isn't playing like you and this is something you have played for years, where you thought to know how your brain is working.
Usually you don't.

Programming a good AI for Monopoly is a very trivial task. Programming a good AI for EU is not trivial.

Btw. I was impressed how good the AI in EU is. Yes, I have beaten the game for many times like a human player should do. I haven't seen that many big AI mistakes.... I have seen more good than bad moves moves.

Neural networks sound sexy. They sound cool. They sound like magic.
That's why many people think that you can solve everything with them ;)
 

unmerged(2833)

Grandpa Maur
Apr 10, 2001
8.614
5
Visit site
Wow, i'm surprised. Till now, we only had people claiming how easy is to write good ai and how ai in EU sucked, and they would wrote better in two days:D
 

unmerged(10704)

Second Lieutenant
Aug 18, 2002
179
0
Visit site
Re: Re: Re: The unfair player : the AI

Originally posted by DarthMaur

Ummm. Yes... you probably aren't aware of the most popular EU I strategy, are you?

Yes, i'm speaking of letting AI gather it armies in one your province, and wait till 90% of them will die due to attrition. What you propose is in reality a big step back:D

Where did I say that AI should stack giant armies in one province? I just said that during war each army should have a target - either enemy army or enemy province. AI in EU2 lacks determination, it's too passive and that's why strong country played by AI can't crush smaller country playd by human.
 

Spruce

Straight Templar Monk
41 Badges
Jul 30, 2001
7.182
8
Visit site
  • Tyranny: Archon Edition
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Victoria 2: A House Divided
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Prison Architect
  • Crusader Kings III
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Arsenal of Democracy
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
Stop the presses!

I want to raise another item =

we need an AI with a certain vision (depending on the goverment type and leader skills) and a certain logical approach to exploit opportunities.

I give an example = Germany makes a counter attack (Ardennes Offensiv) even when the reserve pool is nearly empty.

The vision is stand all ground and counter attack, the logical approach is to capture the Antwerp supply port.

Some AI's in the game should consider this attack (don't take the risk, wage a defensive war), other AI's should do so.

Please no uniform approach for all countries, please oh please... :eek:
 

unmerged(2833)

Grandpa Maur
Apr 10, 2001
8.614
5
Visit site
Re: Re: Re: Re: The unfair player : the AI

Originally posted by comrade


Where did I say that AI should stack giant armies in one province? I just said that during war each army should have a target - either enemy army or enemy province. AI in EU2 lacks determination, it's too passive and that's why strong country played by AI can't crush smaller country playd by human.
Well, you haven't expliitly said it, i admit. Anyway, if it won't move large army, it will be crushed by human armies anyway, on home ground. If it will move larger army, human player will wait till it's cut down to small sized by attrition. Simple:D
 

unmerged(10761)

Second Lieutenant
Aug 22, 2002
181
0
Visit site
distinguish..

Originally posted by Richard Nixon
This is all very interesting, but I think we are overlooking one important aspect: ...etc... please, please do something about the AI!"


Some three things get mixed up here in the criticism thread:

1)'unfair' techniques to make the PC opponent tougher; simply make their armies nearly invincible and reproducing unparallel to the human player capacities.
This is a cheap, really CHEAP solution for a game programmer to make it tough on the human player.
I don't like it..and that is how I started the thread.

2) (EU or Paradox's) AI stupidity.(irrational army (non)movements).
Enough examples have been shown.
(and amazingly many ...uff).
Indeed we should expect better AI for HOI..MUCH better !!

3) The question what GAME do we want ? An EXACT repetition of ALL historical events between 1936-1947 ??
In that case read a history book, and not a HOI manual.
The GAME should better have a fair intelligent computer opponent that should not make 'politically ' motivated mistakes (german halt at Dunkirk, the phony war 1939-1940 in Elzas, etc..etc..), but should act UNSCRUPULOUSLY.

However, for the many 'what if's situations, HOI can devise scenario settings for each such critical mile stone situation;
e.g. 1938 Sudetenland, 1939 Poland, 1940 Norway, Denmark,(incl.France/lowlands )
1941 Barbarossa 1941 Pearl Harbour ...etc..
all meticulously set up with correct army strengths and dispositions..


..odd that I don't get to read a reply from one of the game designers on these AI issues..(or is Nebukad..one of them?)
 

Johan

Studio Manager Paradox Tinto
Administrator
Paradox Staff
Moderator
15 Badges
Dec 14, 1999
18.408
38.945
  • Diplomacy
  • Teleglitch: Die More Edition
  • War of the Roses
  • 500k Club
  • Crusader Kings II: Holy Knight (pre-order)
  • Europa Universalis III: Collection
  • Magicka: Wizard Wars Founder Wizard
  • Hearts of Iron IV Sign-up
  • Stellaris Sign-up
  • Imperator: Rome Sign Up
  • A Game of Dwarves
  • Magicka
  • Starvoid
Re: distinguish..

Originally posted by snailtrailer
1)'unfair' techniques to make the PC opponent tougher; simply make their armies nearly invincible and reproducing unparallel to the human player capacities.
This is a cheap, really CHEAP solution for a game programmer to make it tough on the human player.
I don't like it..and that is how I started the thread.

I agree. None of my games have ever had the AI cheat in combats.

Sure the AI gets some extra income at the higher difficulty levels. (But thats why they are HIGHER difficulties)

Originally posted by snailtrailer
2) (EU or Paradox's) AI stupidity.(irrational army (non)movements).
Enough examples have been shown.
(and amazingly many ...uff).
Indeed we should expect better AI for HOI..MUCH better !!

Define irrational, and try to come up with explanations and suggestions that is not merely abstracted ideas.


Originally posted by snailtrailer
..odd that I don't get to read a reply from one of the game designers on these AI issues..(or is Nebukad..one of them?)

Cause we're busy working on the game, and can't reply to every post.
 
Dec 19, 2001
698
0
Visit site
Re: distinguish..

Originally posted by snailtrailer

..odd that I don't get to read a reply from one of the game designers on these AI issues..(or is Nebukad..one of them?)

No, I have no relations with Paradox.
I'm a programmer, studied computer sciences and have also written some games many years ago (including "AI").
I didn't answer directly to your posts but in a more general way to
- how "easy" it is to develop a good AI
- that this could "easily" be done with neural networks.
- how to write a very basic AI by writing down your own set of rules on a piece of paper to get a better understanding of the task with is labeled by many people as "easy".
 

unmerged(10761)

Second Lieutenant
Aug 22, 2002
181
0
Visit site
...far from being a software programmer..

..so don't pinpoint me on technical details;


But as to
1) unfair play:
I gave that example of the difference between a PC flottila WITh an invading army, and the same one after it has unloaded its troops.
But the very quick raising of armies I find that 'unfair' play too..

2) irrational movements:
Some previous posts have given examples.
I add to that that the invading PC army in 'my ' country often picks a region, besieges it for days (seconds) and then moves on, and does the same for a number of provinces..
Why not stick to one province and finish it ? or why not move on immediately to 'my' capitol ?


I think the increased competition of the AI should fall under 'aggressiveness' (i.e. more aggressiveness = more expansion by 'annexations' either by war or by 'buying'..but in fairness, and when attacking then use more % of men to invade a country versus the % of men to defend the own soil), and by having less/none unstability/revolts problems for the PC country.
..and by having more and powerfull military alliances for the PC country..


And instead of 'learning' from the human player's moves (which I think indeed is very hard to program), I think the AI could (!) have a 'doctrine' like this;
(now limited to invading the human player's territories..but I only offer to ventilate some thoughts..)
Localise the capital and try to siege it .. take care of
a) distance is short enough (versus attrition rates/winter time)..on land and at sea.
b) how big resistance of armies in the vicinity and on the way to it...form an army of at least 120% of those.

If that is not possible.
Then form an army and go after armies smaller than yours, and in provinces where new armies are being developed.
When the opponent's large army is approaching, keep on moving around his territories.

If his capital province is out of reach (high attrition sea zones, blocking neutral countries) then go for other enemy provinces within reach.
Choose (at random?) the nearest, or richest, or weakest province to be sieged.
Again being aware of the enemy's army size in the vicinity.


In HOI this doctrine could (!) translate to fairly the same;
*Go for the capitol...and/or strategic important regions (resources)
*Eliminate enemy armies first (in the target area) before picking on enemy territories (in the target area)..
('obtain supremacy in the skies', obtain supremacy in the fields (keep the mobility), obtain supremacy at the (local to your needs) seas ..

I don't pretend that this encompasses the whole HOI AI theory, and I certainly don't know how to program this...but I do like to see the HOI AI giving a better and fairer resistance..
 

unmerged(5664)

Barrister & Solicitor
Sep 5, 2001
4.676
0
Visit site
Re: ...far from being a software programmer..

Originally posted by snailtrailer
[BI don't pretend that this encompasses the whole HOI AI theory, and I certainly don't know how to program this...but I do like to see the HOI AI giving a better and fairer resistance.. [/B]

We all want this. Johan/Paradox wants this.

It's not as easy as you think. They actually spent a lot of time trying to improve the AI in EU2 - and it is indeed much better than EU1.

So just chill a bit, know that you rmessage has been heard, and don't expect any miracles in AI programming.
 

Spruce

Straight Templar Monk
41 Badges
Jul 30, 2001
7.182
8
Visit site
  • Tyranny: Archon Edition
  • Victoria 2: Heart of Darkness
  • 500k Club
  • Europa Universalis III: Collection
  • Europa Universalis IV: El Dorado
  • Europa Universalis IV: Pre-order
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Rights of Man
  • Victoria 2: A House Divided
  • Hearts of Iron IV: Together for Victory
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Hearts of Iron IV: Death or Dishonor
  • Age of Wonders III
  • Hearts of Iron IV: Expansion Pass
  • Europa Universalis IV: Rule Britannia
  • Prison Architect
  • Crusader Kings III
  • Europa Universalis IV: Conquest of Paradise
  • Hearts of Iron II: Armageddon
  • Crusader Kings II
  • Darkest Hour
  • Deus Vult
  • Diplomacy
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Arsenal of Democracy
  • Europa Universalis IV: Wealth of Nations
  • For the Motherland
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Victoria 2
let me clarify my point of vue =

we need different AI master patterns, the choice should be somewhat random, but also dependent of the goverment type/leader.

F.e. you could have an AI ready to take "risks" or have a "conservative" AI (defensive). Conservative approach is less likely for fascist regimes etc...

The master pattern will decide further game approach (research, combat units, ...).

But the bottom line in this threas is the combat AI. Now AI should decide wether to attack a certain defense line, industrial complex, city, etc. and do all necessary to take the objecitve. Only in some cases the master plan should be abandoned (losses are to high, supplies to low, breaktrough after counter attack,...).

A "stupid" act should NOT be unlogical in HOI. F.e. if a warmonger nation attacks a well defended province and looses dramatically. This seems stupid but is logical from the side of the attacker.

I only want to prevent that AI's are downgraded to act on the moment and loose long period vision. Please no fire fighter AI's!

In EU2 this was allowed due to constant regime changes, but for HOI a certain "red wire" should be visible...

;)
 

Darkrenown

Star marshal
142 Badges
Jan 8, 2002
24.761
16.975
no
  • Leviathan: Warships
  • Europa Universalis IV: Call to arms event
  • For The Glory
  • For the Motherland
  • Gettysburg
  • Hearts of Iron III
  • Hearts of Iron III: Their Finest Hour
  • Hearts of Iron III Collection
  • Heir to the Throne
  • Impire
  • Europa Universalis III Complete
  • King Arthur II
  • Knights of Pen and Paper +1 Edition
  • Europa Universalis IV: Wealth of Nations
  • Lost Empire - Immortals
  • Magicka
  • Majesty 2
  • Majesty 2 Collection
  • March of the Eagles
  • Europa Universalis III Complete
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Victoria: Revolutions
  • Europa Universalis: Rome
  • Rome Gold
  • Hearts of Iron IV: No Step Back
  • Crusader Kings II: Sunset Invasion
  • Ancient Space
  • Arsenal of Democracy
  • Hearts of Iron II: Armageddon
  • Cities in Motion
  • Cities in Motion 2
  • Crusader Kings II
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sons of Abraham
  • A Game of Dwarves
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Deus Vult
  • Dungeonland
  • East India Company
  • Europa Universalis III
  • Europa Universalis III: Chronicles
  • Divine Wind
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
Just in case...

Originally posted by Nebukadnezar

I didn't answer directly to your posts but in a more general way to
- that this could "easily" be done with neural networks.

Maybe you didnt mean me there by I dont think anyone else mentioned neural networks so:

I never meant to imply that neural networks were
-easy to make
-perfect
-a good idea for HoI

Someone said no games have AI that could learn from game to game and I pointed out that a few did.
 
Dec 19, 2001
698
0
Visit site
Re: Just in case...

Originally posted by Darkrenown


Maybe you didnt mean me there by I dont think anyone else mentioned neural networks so:

I never meant to imply that neural networks were
-easy to make
-perfect
-a good idea for HoI

Someone said no games have AI that could learn from game to game and I pointed out that a few did.

No, I didn't mean you.
I've read the desire for learnable AI (4 times) and one (your) answer with a possible solution.

The first part of my post was about neural networks in general because they usually come into play when the topic "learnable AI" is considered. I tried to point out that there are different classes of things we can try to teach to a program to lead the discussion away from ranting about how bad the AI in EUII is (this wasn't aimed at you, because you never said 'how bad the AI in EU is').

The second part was about building your own AI simple enough to test it without using a computer to see "how easy it is to make a poor AI" :D

The last sentence in my first post may have caused you to post. The usage of "many" didn't mean you but I have been in some discussions about AI before and neural networks seem to attract people.

"-a good idea for HoI "
Yes, I had the impression that you thought nn to be a good idea for HOI though you never said it.
It's just that your post is in this HOI-thread about AI ;)