Star Sonata
http://www.starsonata.com/forum/

trade route based, "adaptable" self-replicating AI
http://www.starsonata.com/forum/viewtopic.php?f=3&t=52319
Page 1 of 1

Author:  landswimmer [ Wed May 30, 2012 1:41 am ]
Post subject:  trade route based, "adaptable" self-replicating AI

basically, all this would be, is a change to the way the roaming zebucarts work

they would, rather than upgrading their gear and ship occasionally, do much more work trading resources, and replicate themselves, retaining their old ship, and "buying a new one" for a new AI, rather than trading in the old ship. their "level" would be determined by what gear they have and the ship they are in. they would no longer "buy" levels

the AI would have various attributes, which are "generational", and randomly mutate (either add 1, minus 1, or randomise 0-9) one of the numbers in its "code" that determine its behaviour

starting out at the beginning of the uni, these AI would begin to ship commodities for profit, and teams would have the option to either eradicate these "private shipping" groups, or protect them, and get "free slaves". the AI roaming behaviour would also be determined by their "code", with numbers 0-9 denoting how many jumps an AI is willing to go from its "home" in search of profitable trade routes. it would also open up the option for players to "farm/domesticate" the AI, through players giving credits to ships which act the way they want, allowing those AI to replicate/upgrade faster

the numbers would also dictate how agressive the AI is.

rather than having to work out successful strategies from the start, the AI would all start with every number as "1" and as they replicate, the code mutates (one randomly selected value in the code becomes randomised), and the most succsessful codes replicate more often and die less often, resulting in workable "behaviour" evolving.

it would start out with only 2-3 attributes determined by the code, starting with "agression" (how likely it is for the AI to attack another AI in order to gain money), "search distance"(how far an AI will roam from the galaxy it "spawned" in to search for stations where profit can be made), "minimum generational distance to attack" (how many "generations" an ai must have seperating it from a potential target before it will openly attack it), and "patience" (how many AI stations an AI will dock at before comparing prices and beginning a trade route)

new additions would be added as new methods are figured out for what can be controlled by the "code" system, such as grouping behaviour, what the AI buys (its preferences, such as "buy new ship" or "buy new gun first" or "buy new engine first" etc) and various other things.


as for the trading behaviour, AI would simply need to remember the prices at the stations they have already visited, buying commodities whenever they find the sale price low enough that they can make a profit by shipping it back to a station they visited earlier on. (I.E. "if 'buy' for commod 'x' at current station > 'sell' for commod 'x' at previous station, set orders "buy at current station, jump to galaxy, sell at other station")

the AI would check the prices during each run, and when a profit can no longer be made, they go back to checking prices at other stations.

Author:  Fallen- [ Wed May 30, 2012 1:41 am ]
Post subject:  Re: trade route based, "adaptable" self-replicating AI

im being eraSEd >.<

Author:  Imra15 [ Wed May 30, 2012 3:06 am ]
Post subject:  Re: trade route based, "adaptable" self-replicating AI

I have a very intense sensation that this would go broken.

Author:  HAL [ Wed May 30, 2012 9:10 am ]
Post subject:  Re: trade route based, "adaptable" self-replicating AI

Considering the massive amount of work that would have to be invested to make something like this actually work, what is the perceived benefit of implementing this suggestion? I just don't see the logic, sorry.

Author:  landswimmer [ Wed May 30, 2012 10:45 am ]
Post subject:  Re: trade route based, "adaptable" self-replicating AI

HAL wrote:
Considering the massive amount of work that would have to be invested to make something like this actually work, what is the perceived benefit of implementing this suggestion? I just don't see the logic, sorry.


a much richer game experience, something that SS can have as "unique"?

worst case scenario it would involve maybe 40 lines of code

all you'd need is the code for the AI to create new instances of itself whenever it "sells" a ship, and the code for the AI to search for new trade routes (which would involve roaming, docking at every station and mathematically comparing commodity prices to decide whether to buy and ship to a previously visited station, or to continue searching)

all the other code for AI behaviour (except the coding for the use of "genetic code" for the AI) is already ingame, and the "genetic code" for the AI could be accomplished by having the name of the AI be its "code", with an alias displayed as its name (so its name would be a sequence of numbers determining its behaviour, with the name hidden, replaced by an alias for players to see). AI would replicate and change a single digit in their "real name" resulting in traceable "lines of heredity" as the "market system" fills with AI (with each "species" evolving to be suited to its enviroment)


right now the AI in SS are meant to represent traders and pirates that should naturally occur. why fake it when you can simulate it, and give players something that is completely new and unique to SS?

Author:  HAL [ Wed May 30, 2012 11:21 am ]
Post subject:  Re: trade route based, "adaptable" self-replicating AI

I don't think you know what you are asking, this would require far more than 40 lines of new code to accomplish, not to mention all the other lines of code that would have to be refactored/adapted for use in a system like this.

To put things in perspective, the current code to control AIs is over 10000 lines. Also I think you greatly overestimate the degree that players would actually notice a change like this.

Would it be cool? yes.

Would it actually improve the gameplay experience for any players? Probably not.

Would it be practical to spend time working on something like this? Definitely not.

Edit: Also you have to consider that AIs would likely take up more memory and CPU.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/