ai modification

For what's not in 'Top Priority Game Design'. Post your ideas, visions, suggestions for the game, rules, modifications, etc.

Moderator: Oberlus

Post Reply
Message
Author
markpi
Space Floater
Posts: 35
Joined: Tue Jan 01, 2013 11:27 pm

ai modification

#1 Post by markpi »

hi,
i´m not sure if stuff like this is already implemented, if not
i want to propose an ai modification i met in age of empires :

1. there is an ai ( + player ) ranking
in aoe it was based on enemies killed, army size and costs of the researches finished

2. after a given time rankings are compared ( here maybe 50 turns )
the ais in the lower half will make an alliance ( including the player, if he´s in it ),
which would mean ships don´t fight each other, supply lines aren´t blocked, when attacked they can defend together, and they won´t try taking away systems, of course, which would be the only possibility for the player to be excluded until the reconsideration of the alliance 50 turns later ( i think there was a penalty for breaking peace and in the long run u couldn´t get in there once u did it too often )
of course allies will still try to get specials etc, but will respect when u get them first.
the player will have to be aware of the consequences when he enters the upper part,
i would like the ai ranking being actualized every turn

3. every ai will prefer to attack the more successful one ( provided there is one in the neighbourhood )

this will lead to a kind of dynamic difficulty, and once the player climbs at the top, he will be the hunted one xD

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Alliances & Rankings

#2 Post by Dilvish »

**edit**
ok well since I couldn't get markpi to rename this thread, and got no responses on the main topic of alliances, I'm moving my post to it's own thread, to see if we can get more discussion.
Last edited by Dilvish on Sat Mar 09, 2013 3:26 am, edited 2 times in total.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Zireael
Space Dragon
Posts: 429
Joined: Mon Aug 15, 2011 5:33 pm

Re: ai modification

#3 Post by Zireael »

A ranking in-game chart would be brilliant!

ogre
Space Squid
Posts: 70
Joined: Sun Feb 10, 2013 5:38 am
Location: Flint, Wishagain

Re: ai modification

#4 Post by ogre »

Dilvish wrote:**edit**
ok well since I couldn't get markpi to rename this thread, and got no responses on the main topic of alliances, I'm moving my post to it's own thread, to see if we can get more discussion.
--> "The requested topic does not exist."
markpi wrote: 1. there is an ai ( + player ) ranking
in aoe it was based on enemies killed, army size and costs of the researches finished
[ ] total population
[ ] total fleet ( total armor + total weapons ) *this measurement is potentially the least forward of all and potentially the most complex
[ ] total research points per turn
[ ] total industry per turn
[ ] total research invested
[ ] total industry invested

in my opinion, these values should be handled very carefully which leads me into...
markpi wrote: 2. after a given time rankings are compared ( here maybe 50 turns )
the ais in the lower half will make an alliance ( including the player, if he´s in it ),
which would mean ships don´t fight each other, supply lines aren´t blocked, when attacked they can defend together, and they won´t try taking away systems, of course, which would be the only possibility for the player to be excluded until the reconsideration of the alliance 50 turns later ( i think there was a penalty for breaking peace and in the long run u couldn´t get in there once u did it too often )
of course allies will still try to get specials etc, but will respect when u get them first.
the player will have to be aware of the consequences when he enters the upper part,
i would like the ai ranking being actualized every turn
doing a full calculation every turn if not handled properly could induce massive computation and memory delays
my recommendation is that a by keeping a 'RUNNING TALLY' [array/structure] of the at minimum afore-mentioned values be kept inside or inline with the respective empires major data structure and as such updated on the fly during any production of valued/measured object/item.
i previously TIMED OUT of this forum and lost my entire write+up/response to this thread so i shall try to keep my reasoning brief.
[edit: of course keeping a running tally inline to current /production/ routines without proper thread control/isolation MAY introduce problems that only spinlocks, mutexes, semaphores and privatesections can properly/securely control as they would be effectively operating on shared memory]

keeping this data as a /running tally/ inside the owning empires actual data structure will keep this data "high and tight" for when it is actually needed and will introduce very little visible or real overhead as it if done correctly should keep the structures in cache memory or at least more so than the highly invasive once in a while alternative. AT MOST imo one could see a 5-10 ulonglongs per empire maybe 200 bytes of code globally referencing the current empires main structure in memory with nothing more than ADDS/SUBS.

the alternative is much uglier, and requires "out of scope" invasion and extradition of this data for publication and or consideration by the AI's actual intelligence. this would mean more memory misses reloading every bit of memory that was paged out at the end of a turn and generally a whole lot of unecessary pointer navigation.
markpi wrote: 3. every ai will prefer to attack the more successful one ( provided there is one in the neighbourhood )
this will lead to a kind of dynamic difficulty, and once the player climbs at the top, he will be the hunted one xD
3. i think i may have responded to a different ideal previously before i suffered decapitation at the hands of the global timer gods.
anyways
the 50/50 rule for intelligent alliances i think is weak where galactic stability is concerned.
by the time a top empire hits 50% of total galactic power there is no single competitor or possibly group of competitors who can stop a juggernaut of that size: short-- of a top down hand of god win.
i'm thinking that a 33/33/33 rule would create more stable dynamics and drive for a populated/populating universe.
the top third being excellent targets for jealousy suspicion and general insecurities
the middle third should be where the alliances are held
and the bottom third you ask?
FOOD for the squishy.
at all parts of the game it is far more effecient to capture a fully developed colony than it is to spend time and resources developing it yourself. assimilate and win
besides, any empires that are at the bottom third are going to lose the technology race if they aren't already and being absorbed into the middle third empires allows them to not only feed but to advance by basically cede'ing or falling prey to a more healthy, much more able neighbor.
SO
formal alliance, non-aggression pact, beg/mercy, forfeit/default.
DISRUPT DISARM DISSUADE
it sounded better the first time around before i got screwed by the timeout rules :(
Last edited by ogre on Sat Mar 09, 2013 3:56 am, edited 1 time in total.
thanks for a great game. :)

Starcraft, Syndicate, Populous, Star Control II, Master of Orion, Master of Magic, X-COM UFO Defense, Spacehulk: Vengence of the Blood Angels.

User avatar
Dilvish
AI Lead and Programmer Emeritus
Posts: 4768
Joined: Sat Sep 22, 2012 6:25 pm

Re: ai modification

#5 Post by Dilvish »

ogre wrote:--> "The requested topic does not exist."
I hadn't realized that when a moderator moved my other thread into the Top Priority Game Design forum that it broke the link; that is corrected now. You already knew about that thread since you'd posted there, but perhaps you wanted a more personal discussion with markpi here? If you want to discuss any of this as part of FO alliance planning please move it to the other thread so the conversation doesn't become unnecessarily disconnected between two different threads.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

User avatar
Bigjoe5
Designer and Programmer
Posts: 2058
Joined: Tue Aug 14, 2007 6:33 pm
Location: Orion

Re: ai modification

#6 Post by Bigjoe5 »

ogre wrote:it sounded better the first time around before i got screwed by the timeout rules :(
Usually you can just return to the previous page with your browser's "back" button, and your post will still be there. Failing that, there's an option to remain logged in that you can select on the login page, which prevents you from getting automatically logged out.
Warning: Antarans in dimensional portal are closer than they appear.

ogre
Space Squid
Posts: 70
Joined: Sun Feb 10, 2013 5:38 am
Location: Flint, Wishagain

Re: ai modification

#7 Post by ogre »

ogre wrote:spinlocks, mutexes, semaphores and privatesections...
privatesections should've read CriticalSection
the ECC was firing off in my brain when i posted that but eh :)
thanks for a great game. :)

Starcraft, Syndicate, Populous, Star Control II, Master of Orion, Master of Magic, X-COM UFO Defense, Spacehulk: Vengence of the Blood Angels.

Post Reply