AI's involved in economy

Discuss technical features of Limit Theory and the LT Engine

AI's involved in economy

Postby Banjojohn » Sat Jan 30, 2016 8:24 pm

I've been following LT dev since around 2013, was sad to see updates end, but really glad Josh is in a good place and still working as he can on the game.

I'm very curious about the AI of NPCs in the game. Single player experience has always been something very important to me, as I'm kind of averse to multiplayer games these days, and heck even multiplayer games could be better with fully fleshed out NPC AI.

Josh I think you could, if you wanted to, really inspire and teach a lot of developers and potential developers (like me) by writting blogs about programming and development of all of these wonderful systems you've created and honed.

Anyhoo I'm just really curious how the AI of NPCs was designed to interact with the 'economy' of the game, and how different aspects of the AI scripting or the framework of the economy itself would change things or could be applied to different types of games and systems.
Banjojohn
Recruit
 
Posts: 6
Joined: Sat Jan 30, 2016 8:09 pm

Re: AI's involved in economy

Postby IronDuke » Mon Feb 01, 2016 8:28 am

Velcome to ze forums! :twisted: :wave:
I would also like to know this. I keep forgetting to ask. There is the possibility that it has already been asked and answered though, but I'm too lazy to find it. Plus the forum's search ain't too helpful. :roll:

--IronDuke
Moving toward the future at 60 minutes per hour.
I-War 2 thread
Epic Limit Theory Limerick
User avatar
IronDuke
Rear Admiral
 
Posts: 1388
Joined: Mon Aug 31, 2015 10:47 pm
Location: The other end of the weapons barrage that's killing you. :3

Re: AI's involved in economy

Postby Cornflakes_91 » Mon Feb 01, 2016 2:20 pm

I have problem finding an exact question to answer?

what is it exactly what you want to know?

The way you phrased your question makes them... pretty broad :ghost:
User avatar
Cornflakes_91
Admiral
 
Posts: 9046
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria

Re: AI's involved in economy

Postby Banjojohn » Mon Feb 01, 2016 8:21 pm

How does one make an AI for effective self regulated NPC economy that keeps going even without player interaction I suppose is what I'm wondering.
Banjojohn
Recruit
 
Posts: 6
Joined: Sat Jan 30, 2016 8:09 pm

Re: AI's involved in economy

Postby Silverware » Mon Feb 01, 2016 8:40 pm

AI looks for profit, does things to make most profit.
AI has chance of not changing from what they were last doing. random chance per AI, but is set when the AI is spawned, call it aversion to change.

Economy needs something, and as need goes unfulfilled prices go up, supply/demand that shit.
AI sees new profit, and some will go do this, the ones who like change.

Supply increases, demand is satisfied, prices go down, some AI move, some stay.

Economy self balances through some AI's staying in older areas of profit, and some moving to new areas.
Some AI's will die off due to staying too long (just like video rental stores did), some will die off due to jumping in too early.

As AI's get richer, they should spawn children AI's that do the same thing, and their random chance is based on their parent's +/- some amount. This allows for sector growth, and development. Children pay a dividend to the parent, until they earn enough to "buy out" their contract with the parent and spit off to be their own entity.

Players then have a possible start point, being a child of a rich enough AI, and paying back their benefactor until they can buy their contract out and make it on their own.
ᕕ(ಠ‸ಠ)⊃━☆゚.*・。゚
Image
User avatar
Silverware
Vice Admiral
 
Posts: 2806
Joined: Sun Sep 07, 2014 3:23 pm
Location: Goattown-Three, Sigma Six, Goat Space

Re: AI's involved in economy

Postby Banjojohn » Tue Feb 02, 2016 7:14 pm

Hmmm, yes that makes sense. Thanks! How then would an AI come to the conclusion of wanting to do some kind of.. nepharious plot against another AI or the player, and try to conspire with other AIs to do it? Also AI's hiring other AI's to fufill requests.

Sorry for tacking those on but I think its somewhat related and I'm curious how AI would be involved in those as well.
Banjojohn
Recruit
 
Posts: 6
Joined: Sat Jan 30, 2016 8:09 pm

Re: AI's involved in economy

Postby Silverware » Tue Feb 02, 2016 8:58 pm

Banjojohn wrote:Hmmm, yes that makes sense. Thanks! How then would an AI come to the conclusion of wanting to do some kind of.. nepharious plot against another AI or the player, and try to conspire with other AIs to do it? Also AI's hiring other AI's to fufill requests.

Sorry for tacking those on but I think its somewhat related and I'm curious how AI would be involved in those as well.



AI scans local freighters and sees the value of the cargo, subtracts the convoy's defences to get a approximation of how much profit he can expect.
If the margin is high enough, and/or he is aggressive enough, then he will attack said convoy and capture their goods to sell.


If another AI is also making profit on the same good, the first AI will check the second AI's defences and determine if it would be worth attacking to lower supply, therefore increasing profit for him. otherwise same as above.


If an AI want's any task done, he can put a number on that task for it's value to him, and put that up as a mission.
This includes shipping items, killing enemies, anything really (every possible task should be in this list)
However if he owns his own ships that can fulfil that role, he can then check their ability to do that role against the profit of their current task and reassign them fittingly. Shoring up any lack of capability with mercenaries.
Basically this is how he decides to do things anyway, and could be determined by a value of something like "Likes to own stuff", if he doesn't like to own stuff, then hiring mercs to do jobs for him, like moving goods, mining ore, researching tech, killing his enemies, may be the way he goes.
In fact it should be perfectly possible for a player or AI to play the role of an empire without owning a single ship, by just putting up jobs.


Consiring with other AI's might be a problem, but two or more might put a similar job out, like killing a third factions ships.
Which would look like conspiracy to the players.


Don't worry, asking questions is good, and it allows people to put their thoughts on the matter out there.
ᕕ(ಠ‸ಠ)⊃━☆゚.*・。゚
Image
User avatar
Silverware
Vice Admiral
 
Posts: 2806
Joined: Sun Sep 07, 2014 3:23 pm
Location: Goattown-Three, Sigma Six, Goat Space

Re: AI's involved in economy

Postby FormalMoss » Tue Feb 02, 2016 9:17 pm

Silverware wrote:

Consiring with other AI's might be a problem, but two or more might put a similar job out, like killing a third factions ships.
Don't worry, asking questions is good, and it allows people to put their thoughts on the matter out there.



"Conspiring with other AI's ... "
(ftfy) :lol:

And there's always someone somewhere who knows how to spell properly!
:P
(speed of typing vs ability of brain to realise typos)

Excellent responses silver.

From what I know the AI has cogs that are determined by their own "brains" as Josh terms it.
Like a coin falling in those arcade games where it bounces from one stick to another.
Josh programs the AI to just do it's thing, each AI has it's own personal branch of "AI" as determined by race, and other aspects of personality traits that are thrown in to the mix.

One vid I watched recently showed that some AI chose to be miners, whilst others (the Captains) chose their role based on their "end-goal" (either make money, miner - or dominate, be captain and henceforth a faction leader).
Add in the extra special stuff that Silver hints at above, and you have AI that have equally different goals throughout every system/ asteroid field/ planet.
Josh has shown in the vids how the AI will randomly choose a sell price, whether they are successful are not is determined by the fluctuation in the markets based on supply/ demand.

Truly astounding stuff :)
YAY PYTHON \o/

In Josh We Trust
-=326.3827=-


User avatar
FormalMoss
Captain
 
Posts: 957
Joined: Fri Jun 06, 2014 8:06 am

Re: AI's involved in economy

Postby Silverware » Wed Feb 03, 2016 1:31 pm

Luckily the actual structure of a free-market AI is pretty simple.
Look for profit, do thing to make profit, if other job has more profit, decided if you should do that instead.

The programming of most of it is just logic trees.
But the programming of advanced profit calculation, that's the cincher. If you can manage to get this part of the equation working accurately, guessing at base profit for each task, then the AI will pursue these tasks properly, and the world will seem properly alive (because it will be alive!!)

However you do need to have enough AI to populate each sector to be able to do this long term.
As market stability long term in this sort of scenario is dependant primarily on the number of individuals making decisions, and the quality of their decisions.

A few hundred AIs will have a much less stable market than one with a few thousand.
Simply because more can afford to make mistakes without dooming the market to die a slow and painful death.
ᕕ(ಠ‸ಠ)⊃━☆゚.*・。゚
Image
User avatar
Silverware
Vice Admiral
 
Posts: 2806
Joined: Sun Sep 07, 2014 3:23 pm
Location: Goattown-Three, Sigma Six, Goat Space

Re: AI's involved in economy

Postby Hyperion » Wed Feb 03, 2016 8:52 pm

Silverware wrote:
However you do need to have enough AI to populate each sector to be able to do this long term.
As market stability long term in this sort of scenario is dependant primarily on the number of individuals making decisions, and the quality of their decisions.

A few hundred AIs will have a much less stable market than one with a few thousand.
Simply because more can afford to make mistakes without dooming the market to die a slow and painful death.


I have previously suggested this before, but doing so again wouldn't hurt.

First, station AI should have an order of magnitude more control over the local market than a mobile Ship AI to account for onboard beings making their own decisions about investments. And colonies should have orders of magnitudes more than that. (eg. Ship-Origin goods might be traded in increments of 1, Station-Origin goods in increments of 10, and Colony-Origin goods in increments of 1000)

Planetary colonies should always be BY FAR the largest players in a system's market... with the possible exception of a large faction's multi-system trade hub. Huge players like colonies with gigantic stockpiles and production of resources (compared to deep-space stations or with ships) will provide a lot of stability for a market with the handful of AI that would normally be present in a system. Colonies would of course have their own volatility based on internal dynamics, and this planetary volatility would often have more effect on the economy than all the local ships combined.

Because Planet's will have the greatest impact, their internal dynamics would be the most important factors for a system's economy. As such, I have suggested that each Planetary colony have multiple AI with different interests, stockpiles, and production capacities, much like different companies in the real world.
(This could easily be tied into Planetary Ownership Play, but that's for a different discussion)

These AI aren't nearly as complex as the mobile ships, and are focused on high level decisions and planning in the forms of Production, Profit, and [relative] Power. They aren't full AI, but they have enough intelligence to be independent actors in a given economy, and given their size, they have the power to skew the entire system in their favor (as they ought be able to)
Image
The traditional view of robotics, the metal servant who doesn't ask questions, is merely nostalgia for slavery.
User: JoshParnell is accountable for this user's actions.
User avatar
Hyperion
Rear Admiral
 
Posts: 1928
Joined: Thu Apr 17, 2014 4:59 pm
Location: Sneaking up on the Jabberwocky

Re: AI's involved in economy

Postby Banjojohn » Fri Feb 05, 2016 5:02 pm

Hmmm, interesting stuff!

I was thinking an AI might have an active memory of encounters with other AI's and of course the player, depending on the nature of the encounter it might effect the AI's view on the other entity positively or negatively on the 'friendliness scale', if you get too negative on the friendliness scale, and the AI remembers why it doesnt like you like 'cost me lots of money' or 'shoots at me or people i like' it might check the friendliness level of you with other AI's it encounters and forms a new organization or social group with AIs that consider you a certain level of unfriendly. Then who knows where it goes from there as far as trying to out-maneuver you for economic things, trying to find neutral AI bounty hunters to take you out, etc.
Banjojohn
Recruit
 
Posts: 6
Joined: Sat Jan 30, 2016 8:09 pm

Re: AI's involved in economy

Postby FormalMoss » Sat Feb 06, 2016 5:18 am

Banjojohn wrote:Hmmm, interesting stuff!

I was thinking an AI might have an active memory of encounters with other AI's and of course the player, depending on the nature of the encounter it might effect the AI's view on the other entity positively or negatively on the 'friendliness scale', if you get too negative on the friendliness scale, and the AI remembers why it doesnt like you like 'cost me lots of money' or 'shoots at me or people i like' it might check the friendliness level of you with other AI's it encounters and forms a new organization or social group with AIs that consider you a certain level of unfriendly. Then who knows where it goes from there as far as trying to out-maneuver you for economic things, trying to find neutral AI bounty hunters to take you out, etc.


Hi Banjojohn,

This is where Josh showed us in an update vid how factions work.
In brief:
- Picture 3x factions all vying for the same market (e.g. mining)
- One faction puts out a tender to cause damage to its competitor over a specific time range - This could be you, the player, who has a mining op in the sector.
- Other AI will then accept this "Mission to cause damage" and start firing at your ships

I know you're talking about individual groups, but I don't know if Josh has this covered, or whether it is covered under the umbrella of Factions above.

I'll root out the vid on youtube for ya :)

fM
YAY PYTHON \o/

In Josh We Trust
-=326.3827=-


User avatar
FormalMoss
Captain
 
Posts: 957
Joined: Fri Jun 06, 2014 8:06 am

Re: AI's involved in economy

Postby 0111narwhalz » Thu Mar 03, 2016 8:58 pm

From a user's standpoint, the AI should behave almost indistinguishably from a rational player.
I like Banjojohn's thoughts of the relations scale. Additionally, perhaps one could concieve of a predictive algorithm which looks at the sources of profit, positive and negative, and determines if a particular threat is anywhere from buzzing fly to an existential crisis. For instance, if a character (player or otherwise) begins to prey upon the miners in some backwater 'roid belt, the massive faction which employs them might decide that it's cheaper to lose some ships. Or, if the agressor begins to attack the larger, more important targets, the faction AI might predict that the threat seems to have an upward trend and kill off the pirates before its profits suffer to too great a degree. If the threat is sudden and forceful enough, a player should be able to force the AI to choose different shipping lanes.
In the event that a factional AI fails to possess the needed force by which it may extinguish the threat, or if it deems it more profitable to do so, the AI should put up a contract offer to either a mercenary group to kill the pirates, or to a freight transport service which uses its higher rates to afford a form of protected convoy.

Of course, I have little idea how to achieve this.
User avatar
0111narwhalz
Commander
 
Posts: 400
Joined: Mon Feb 01, 2016 11:40 pm

Re: AI's involved in economy

Postby Cornflakes_91 » Fri Mar 04, 2016 8:00 am

... which is how its already going to work as far as i know/interpreted from the devlogs
User avatar
Cornflakes_91
Admiral
 
Posts: 9046
Joined: Wed Mar 06, 2013 1:53 am
Location: Austria


Return to Technical



Who is online

Users browsing this forum: No registered users and 3 guests