• 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.

HJ Tulp

General
22 Badges
Jan 19, 2002
1.995
1
  • Europa Universalis IV
  • Hearts of Iron IV: Cadet
  • 500k Club
  • 200k Club
  • Rome Gold
  • Victoria: Revolutions
  • Europa Universalis IV: Res Publica
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • Heir to the Throne
  • For The Glory
  • Hearts of Iron II: Armageddon
  • Europa Universalis III Complete
  • Deus Vult
  • Crusader Kings II: Sword of Islam
  • Crusader Kings II: Sunset Invasion
  • Crusader Kings II: Sons of Abraham
  • Crusader Kings II: The Republic
  • Crusader Kings II: Rajas of India
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II
I think it's Artificial Intelligence.
It's what plays the countrie's you don't play.
 

Castellon

★Paradox Forum Manager★
Administrator
Paradox Staff
110 Badges
Mar 12, 2002
43.218
1.812
  • Europa Universalis IV
  • 200k Club
  • 500k Club
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
  • Humble Paradox Bundle
  • Paradox Order
Or as it is often called Artificial Idiot. :D
 

Petrarca

Cacique Occidens
5 Badges
Sep 25, 2001
2.798
0
Visit site
  • Europa Universalis III
  • Europa Universalis III Complete
  • Europa Universalis III Complete
  • 500k Club
  • Europa Universalis III: Collection
Originally posted by Mad King James
I disagree :D
I'd like to say that your AI (with a few modifications to colonial & target fields) has done an excellent job of winning the HYW for France. See here.here.
 

Tormodius

Alien
72 Badges
Jul 18, 2002
2.651
142
www.j-diva.no
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Rise of Prussia
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Europa Universalis 4: Emperor
  • For the Motherland
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Hearts of Iron III
  • Magicka
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Rome: Vae Victis
  • 500k Club
On the issue of Artificial Intelligence

Okay, real A.I. is when the computer can learn from our human action patterns. And so to act like you, or give an intelligent response.

Example from EU2:
If you constantly attack during the winter, and your first troops consists mainly of cavalry then of a second wave artillery on spring time, then the EU-AI will not be able to produce the most effective defensive stategy, (though it can simulate pretty well) because it cannot learn your from your patterns.
Conclusion: It's just ordinary code, not a true A.I. code.


Ordinary pseudocode can go like this:


Code:
# RND: random choice between options.
# X: human player id.

FOR all players X DO
     IF cb==true and MilStrenght >= Player(X)+Allies THEN 
            DoW Player(X)


# The winter problem:

IF month > Nov  THEN   
      Return troops from siege RND assault.  
ELSE
      Add more troops to siege RND check other provs siegestatus.

IF month == (Dec TO Mar) AND player X sieges_me  THEN   
      Form the counteroffensive army.
      Wait  till  spring.




A.I. pseudocode goes something like this: (generic code)


Code:
# Consider a mulitplayer game of 3 humans, incl. one EU-robot.
# The two others thinks he is a human somewhere 
# at the internet.....  How can they tell?

# AI_DB: A logic database consisting of tracked human actions.

# Weakness_exploits: an essential algorithm determining 
#computer strategy. Returns highest rated weaknesses 
#of each player.

# DoW_check: an important algorithm checking CB, strength 
#patterns of player warfare etc. Returns a DoW, or nil.

#game startup:

FOR all game_instances DO
     Load AI_DB
     Randomizer = disabled
     PlayerTracking = Input to AI_DB

#in game example:

FOR all HumanPlayers DO 
    player1.weakness1 = Lookup AI_DB.record(1,1)
    player2.weakness1 = Lookup AI_DB.record(2,1)
    player1.warpattern1 = Lookup AI_DB.record(1,2)
    player2.warpattern1 = Lookup AI_DB.record(2,2)

IF player1.weakness1 > player2.weakness1 THEN
    DoW_check  player1.warpattern1 
    Weakness_exploits ( player1, top_10_weak)
ELSE
    DoW_check player2.warpattern1 
    Weakness_exploits ( player2, top_10_weak)


# Where '>' can be replaced by a generic comparator.
# And to check through weakness2, and weakness3, etc.

And the latter was not implemented in EU2. :(
 
Last edited:

Castellon

★Paradox Forum Manager★
Administrator
Paradox Staff
110 Badges
Mar 12, 2002
43.218
1.812
  • Europa Universalis IV
  • 200k Club
  • 500k Club
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
  • Humble Paradox Bundle
  • Paradox Order
Originally posted by DoctorPlague
Why is the code black? How do I make it white?

(color=white) only make the brackets square ones [ ].
 

Castellon

★Paradox Forum Manager★
Administrator
Paradox Staff
110 Badges
Mar 12, 2002
43.218
1.812
  • Europa Universalis IV
  • 200k Club
  • 500k Club
  • Hearts of Iron II: Beta
  • Victoria 2 Beta
  • Humble Paradox Bundle
  • Paradox Order
Re: On the issue of Artificial Intelligence

Originally posted by DoctorPlague
Okay, real A.I. is when the computer can learn from our human action patterns. And so to act like you, or give an intelligent response.
You are talking about hard AI vs soft AI.

Conclusion: It's just ordinary code, not a true A.I. code.

DO you have any concept of what this game would cost you if it implemented a multi hidden layered neural net. Not to mention the new hardware you would have to buy.
 

unmerged(10355)

Colonel
Jul 24, 2002
918
0
quizz.8k.com
It's quite a big leap to go from that pseudo-code to actual source code that works. There are probably also some major run-time problems in trying to do AI reasonably well for over a hundred countries at once.
 

unmerged(9404)

Engineer
May 20, 2002
3.333
0
Visit site
Originally posted by Petrarca

I'd like to say that your AI (with a few modifications to colonial & target fields) has done an excellent job of winning the HYW for France. See here.here.

But Petrarca I think that Burgundy and England probbly also used the MKJ ai. France winning the HYW is probably more due to the ferocity=yes setting, the fact the war is fought on Frencch soil, and the fact that other countries jumped on the Burgundy/English alliance.

I am not really sold to MKJ's ai, I still see it do some stupid stuff. I guess I have to watch a lot of ai movement with both ai's before I can make a good conclusion, but that's quite boring (and frustating!)
 

Tormodius

Alien
72 Badges
Jul 18, 2002
2.651
142
www.j-diva.no
  • Hearts of Iron IV: Cadet
  • Europa Universalis IV: Pre-order
  • Pride of Nations
  • Rise of Prussia
  • Mount & Blade: Warband
  • Europa Universalis IV: Common Sense
  • Europa Universalis IV: Cossacks
  • Crusader Kings II: Conclave
  • Europa Universalis IV: Mare Nostrum
  • Stellaris
  • Stellaris: Galaxy Edition
  • Stellaris: Galaxy Edition
  • Hearts of Iron IV Sign-up
  • Europa Universalis IV: El Dorado
  • Hearts of Iron IV: Colonel
  • Crusader Kings II: Reapers Due
  • Europa Universalis IV: Rights of Man
  • Stellaris: Digital Anniversary Edition
  • Stellaris: Leviathans Story Pack
  • Hearts of Iron IV: Together for Victory
  • Crusader Kings II: Monks and Mystics
  • Stellaris - Path to Destruction bundle
  • Europa Universalis IV: Mandate of Heaven
  • Europa Universalis IV: Third Rome
  • Surviving Mars
  • Europa Universalis 4: Emperor
  • For the Motherland
  • Crusader Kings II: Charlemagne
  • Crusader Kings II: Legacy of Rome
  • Crusader Kings II: The Old Gods
  • Crusader Kings II: The Republic
  • Crusader Kings II: Sword of Islam
  • Darkest Hour
  • Europa Universalis III
  • Europa Universalis IV
  • Europa Universalis IV: Art of War
  • Europa Universalis IV: Conquest of Paradise
  • Europa Universalis IV: Wealth of Nations
  • Europa Universalis IV: Call to arms event
  • Crusader Kings II
  • Hearts of Iron III
  • Magicka
  • March of the Eagles
  • Naval War: Arctic Circle
  • Europa Universalis IV: Res Publica
  • Semper Fi
  • Victoria 2
  • Victoria 2: A House Divided
  • Rome: Vae Victis
  • 500k Club
Originally posted by Quizzical
It's quite a big leap to go from that pseudo-code to actual source code that works. There are probably also some major run-time problems in trying to do AI reasonably well for over a hundred countries at once.



Yes, the DB-lookup would take ages with our current technology.
An open DB-file with AI-info could consume endless of RAM, as becoming more "intelligent".
And implementation in a specified code would look quite different. To write such code, one should have a generic algorithm to begin with. The point was to illustrate how a computer can learn from your interaction with it.

Another way to work with AI is to let the code become self changeable. Thus, the program can create new code based on inputs over time. To achieve this, one should also make polymorphic and generic code. That would mean to act with "many faces" and being weakly bounded. We can call that "soft" since there should be very little hard-coded
decisions, rules, and so on.

Well, that's subject to research right now and would not yet be suitable to a strategy game like EU2.
Just to simulate an AI,
is the most efficient for computer games in our time...
 
Last edited: