AI needs to read Machiavelli

I think my inability to get a decent competitive game out of DA these days is related to the fact that I've read Machiavelli and the AI hasn't. More seriously, the AI doesn't respond well to devious tactics, and for the human player (me) it requires unrealistic self restraint not to use such tactics.

For context, I've been playing 4X since MoO, 15 years ago. So I kinda know what works and what doesn't. And therein lies the problem. I play GC2:DA on painful or crippling, (full AI, simply continuing to up the difficulty level to give the AI more bonus production is beside the point IMO).

What do I mean by devious? Nothing more than playing the game that is there, really, but I suppose I mean things like;
  • Early trade, diplomacy and small tributes to avoid war at times that don't suit me (meanwhile I am maximising my economy and research advantage).
  • When my lack of military strength starts to become too much of a temptation for other races, I start building a few medium hull ships, as a defensive bank. All the time keeping my economy and bank balance well into the green.
  • If I do get into an unwanted shooting war, quickly develop my medium ship design to the optimum available and upgrade the ships in the immediate area of conflict. My earlier focus on research will usually give my latest ships a significant advantage over the enemies old designs that have been slowing travelling into my region.
  • When I go on the attack, I identify and focus upon the crucial enemy planets. A good attack on multiple fronts should take several enemy planets in one quick wave, overwhelming his resource base and making it mine. Clean the enemy ships from the skies of any nearby planets I can't immediately occupy.
  • I force myself not to use influence bases to take over premium groups of planets. It's just too easy.
  • I prefer to play as a custom race with super warrior ability. I know this is why most of my games get too easy, as my smaller numbers of higher quality ships can then chew through vast numbers of opposing ships with few losses. The AI does respond well to this tactic and does not put enough value upon movement points and logistics (allowing my first strikes on multiple small ship groups and still retreat to avoid retaliation).
  • I usually play evil early on to get the colony advantages (and friendship with the most aggresive evil races), then pay for the switch to neutral for the morale and research benefits.


Perhaps I should avoid taking the super warrior ability, but it's much more fun to have small numbers of high quality ships wading through the opposition, like 300 spartans without the unfortunate ending. (Or as a better analogy, like a dozen F22 Raptors against, well, just about anything - look 'em up on Wikipedia). To offset this "advantage" I usually start a custom game in a gigantic universe with no more than a few available planets - if I can see that I will readily colonise more than 4 or 5 planets (or 2 - 3 really good ones) then I start again looking for a greater handicap.

If you've bothered to read all this, you can see I'm just rambling really. Still love the game, but haven't had a "tough" time winning for a long time, including the epic game just finished which motivated me to this post. In that game I even left the Dread Lords alone for ages, but they never amounted to much and were no match for my little doom ray equipped raptors. I'm really hoping the new Twilight pack includes some surprises in the AI.

Cheers Greg
11,925 views 19 replies
Reply #1 Top
I got lost part way through.

A few hits of the 'enter' key sure would help readability.
Reply #2 Top
Yeah, did that, but the formatting didn't come up on the post. Thanks for the helpful advice though ;)
Reply #3 Top
You can edit the original post despite the fact people have already replied to it.

On these forums, original posts are the exception to the "can't edit after replied to" policy.
Reply #4 Top
Paragraphs are good.

I dunno who Machiavelli is - are his tactics similar to Sun Tzu's?
Reply #5 Top
Paragraphs are good.I dunno who Machiavelli is - are his tactics similar to Sun Tzu's?
End of quote


Niccolo Machiavelli, author of "The Prince", is to politics as Sun Tsu is to warfare.

Reply #6 Top
I read something recently where many scholars are beginning to think that "The Prince" was actually intended to be a oblique criticism of the people in power duirng Machiavelli's lifetime, and not as a handbook to rulers to guide them in the uses of power. The speculation is that if he were to have written a more direct criticism of the powers-that-be at that time, he surely would have been censored, arrested, locked-up, tortured, or even executed. Rather than advising rulers in the use of power, he was perhaps decrying those very same nefarious tactics.

Kzinti empire2.JPG Sentient species taste better...
Reply #7 Top
If only NIETZSCHE could speak again, he probably would develop his very own agressivity tactics at levels beyond what we've known from plenty.
Reply #8 Top
I'm not sure that it is possible at this point to program an AI to act in such a way as he proposes. Putting out the 'glad hand' while simultaneously preparing for war is just too complicated an undertaking for the AI to 'understand'. Things get even more complicated from there. Friendly relations are very valuable in this game. They bring trade, treaties, mutual defense pacts, as well as just not having to worry about being attacked by that civ. The AI would have to balance the advantages of this against the potential gain that war would produce. This is simply beyond what the AI, or any AI for that matter is capable of.

I, for one, am glad that this is the case. Being devious is one of the only advantages that I, as a human player have over the AI. Besides which, could you imagine the howls of angst if the AI ever did begin to behave in this manner?

Now that I have addressed the point that I believe you were making, (I read your post late last night, and am doing this from memory since I simply could not bear to re-read it today), I urge you to go back and study his works in more depth. If you had done so, you would realize that the AI very much does act in a manner consistent with his philosophies. Here are a few examples:

"He who has not first laid his foundations may be able with great ability to lay them afterwards, but they will be laid with trouble to the architect and danger to the building." Build your infrastructure with care. Can you say 'economic crash'?

"War cannot be avoided; it can only be postponed to the other's advantage". Eventually the game will descend into war, and it is better to prepare for it sooner rather than later.

"If an injury has to be done to a man it should be so severe that his vengeance need not be feared." When you do go to war, crush them entirely, using any and all means necessary.

And the most important of all: "Since love and fear can hardly exist together, if we must choose between them, it is far safer to be feared than loved."

This is one of the central tenets of diplomacy in this game.

See? The AI adheres much more closely to his philosophy than you think.


Reply #9 Top
"I read something recently where many scholars are beginning to think that "The Prince" was actually intended to be a oblique criticism of the people in power duirng Machiavelli's lifetime"

Machiavelli was fishing for a job at the time, so 'The Prince' is actually the most extensive and well-written resume in history. (He didn't get the job, BTW).
Reply #10 Top
"If an injury has to be done to a man it should be so severe that his vengeance need not be feared." When you do go to war, crush them entirely, using any and all means necessary."
End of quote


I recall a quote by someone (perhaps Alxander the great or Sun Tzu, I cant recall exactly), that said the exact opposite. Something to the effect of, "When you try to completely crush your enemy, their only remaining option is that of revenge."

Wish I could more specifically remember where/who that was from.

Kzinti empire2.JPG Sentient species taste better...
Reply #11 Top
I think you're thinking of the 48 laws of power, specifically Law # 15 and Law # 47.

Law # 15:

Crush your Enemy Totally

All great leaders since Moses have known that a feared enemy must be crushed completely. (Sometimes they have learned this the hard way.) If one ember is left alight, no matter how dimly it smolders, a fire will eventually break out. More is lost through stopping halfway than through total annihilation: The enemy will recover, and will seek revenge. Crush him, not only in body but in spirit

Law # 47:

Do not go Past the Mark you Aimed for; In Victory, Learn when to Stop

The moment of victory is often the moment of greatest peril. In the heat of victory, arrogance and overconfidence can push you past the goal you had aimed for, and by going too far, you make more enemies than you defeat. Do not allow success to go to your head. There is no substitute for strategy and careful planning. Set a goal, and when you reach it, stop.

Some other laws that would apply well to a 4X game:
* Never put too Much Trust in Friends, Learn how to use Enemies
* Win through your Actions, Never through Argument
* When Asking for Help, Appeal to People’s Self-Interest, Never to their Mercy or Gratitude
* Pose as a Friend, Work as a Spy
* Do Not Build Fortresses to Protect Yourself – Isolation is Dangerous
* Know Who You’re Dealing with – Do Not Offend the Wrong Person
* Do Not Commit to Anyone
* Keep Your Hands Clean
* Enter Action with Boldness
* Work on the Hearts and Minds of Others
Reply #12 Top
Interesting lessons
Reply #13 Top

"I read something recently where many scholars are beginning to think that "The Prince" was actually intended to be a oblique criticism of the people in power duirng Machiavelli's lifetime"Machiavelli was fishing for a job at the time, so 'The Prince' is actually the most extensive and well-written resume in history. (He didn't get the job, BTW).
End of quote


Machivelli is definitely an interesting figure with an eye for the main chance. One thing I learned about him a few years ago that I hadn't heard before was that he briefly collaborated with Leonardo Da Vinci on a scheme to try and divert the Arno River to make Florence a seaport.



Reply #14 Top
Firstly, a further apology for the paragraph formatting not showing up in my original post. After experimenting with editing and Firefox options it turned out that my scriptblocker ("NoScript") add-on in Firefox was the culprit, and I've now successfully edited formatting in the original post.

Without cross-replying to each, many interesting and informative comments from other readers on Machiavelli and related points. Machiavelli was my example, rather than the sole case, of where the AI falls short and as others have said perhaps it always will. Although it would be pretty cool to see some of the nefarious human tactics recognised and used by the AI - and if achieved, maybe there should be a "Machiavellian" AI toggle :)

I know next to nothing about code, but I also wonder whether these sort of resources (writings of philosophers and thinkers) are used by the software writers, or whether it has to be a resource and position optimisation program with look-ahead.

Reply #15 Top
[quote=Sun Tzu's Art of War]
III. ATTACK BY STRATAGEM
8. It is the rule in war, if our forces are ten
to the enemy's one, to surround him; if five to one,
to attack him; if twice as numerous, to divide our army
into two.

9. If equally matched, we can offer battle;
if slightly inferior in numbers, we can avoid the enemy;
if quite unequal in every way, we can flee from him.
[/quote]

Sun Tzu tends to be quite situational, realizing that there is no one way to defeat an enemy. He warns that if you are too predictable, a counter strategy can be devised. I've seen many players that have devised a single strategy in a strategy that "almost always works," only to be wiped when somebody figures out a counter. I also know a person that was pretty much banned from a game because he managed to break into a high ranking ladder because he found a counter to a common tactic the top ranking players were using. IMHO a good strategy game will not favor one strategy or tactic all of the time, but will encourage a lot of variety.

One thing that Sun Tzu emphasizes is that the best war is the one not fought. Diplomacy is the most preferred, and covert operations is preferred over open warfare. Open warfare, although he describes it in the most detail, should be avoided if it is possible to accomplish the same objective without warfare.
Reply #16 Top
Firstly, a further apology for the paragraph formatting not showing up in my original post.
End of quote


No prob, bro. We've all done this before. (At least I have; I use Firefox also.)

Frogboy's stated goal has always been to make the AI at least as capable as a human player. He's pretty good at what he does, and very persistent, so I fully expect that at some point, perhaps ~GC3, that we can expect the Drengin to attempt to gift us with a Trojan Glerx. ;)



Reply #17 Top
Very nice thread.

Re the reading list, I agree that GC2 seems already close to Machiavelli's model in The Prince, and that the book was a resume, stealth satire, or both. Thomas Hobbes' Leviathan is almost half CYA verbiage, but the working half should be on the devs' reading list for GC3 along with Aristotle's The Politics, a good democratic theorist like J.S. Mill or Robert Dahl, and a philosophical anarchist such as Robert Wolff.

I'm pretty confident that GC3 will take at least a few good steps twoards what Greg wants. The differentiation in the current computer civs is already heading that way. My real hope is that by broadening the reading list, GC3 will become more than simply another wargame.

Much of what Greg says in the OP is true for me, right down to the basic Money + Tech = Real Power thing. But I've managed to stay too interested in the game almost precisely because military wins on the maps I like are so tedious that I've yet to finish one. A better "reading list" for the computer players could pave the way for a new version of the game that puts all victory conditions on an equal footing.
Reply #18 Top
But I've managed to stay too interested in the game almost precisely because military wins on the maps I like are so tedious that I've yet to finish one.
End of quote


Yeah - and in real life, military wins are tedious as well. If you reach a choke point where the defender has the advantage, then you don't want to attack. You will attempt to bait the defender to enter the point where you have the advantage - but if the defender is smart, they won't take the bait. It's easy to end up in a stalemate in real warfare.

So, yeah, I guess trying to simulate real life too closely wouldn't be that good for a game - you don't want to end up with a lot of stalemates. However, I still like to be able to practice some real strategy rather than the simple "whoever rushes first wins" that has filled a lot of RTS games.
Reply #19 Top
I'd say... bring on Bonaparte, Khan & Kamikazees and we've got ourselves a pretty nice pattern for war tactics which the AIs ****may**** (and, i theorize this very carefully, btw) just be lethal enough to put any Drengins to shame.
Gamewise, i would add that the most reasonable asset an algorithm can show for is exactly in the same veins as what is being used right now; retaliation based on best available targets as it compares to pointless directions.
Frustrating as it may seem, being ignored by a binary opponent is something only emotionally involved Human can truly appreciate while reacting accordingly - maybe not in the right way, but at least sufficiently aggressive.

Nearly 85% of Peace is made of battleground deaths. 14% of glory and the tiny but important last 1%, of philosophical observations by both sides in & after a conflict.
:)