Return to “General”

Post

AI (from Monday Dev Log)

#1
Progress report on my test scenario: my NPC has successfully docked, bought the transfer unit, headed out to the roid field, mined some ore, returned home, and sold it. I guess that's pretty much....success!!! :D But I'm not 100% satisfied, because he changed his mind a few times - while headed back to the station, he would suddenly decide to mine just a few more rocks and then head back. This happened a few times before the voyage was made in entirety. The underlying problem is the difficulty of exploring an unbounded quantitative space - everything is formulated discretely at the moment, such that the AI will say "oh, if I had 11 units of ore, I could sell them at the station for 22 credits!" Hence, as soon as it mines 11 units of ore, it heads back. If, during the trek back, it suddenly realizes "wait! I could mine 15 units of ore and make EVEN MORE credits!" then it may turn around.

That might seem dumb of the AI, but in reality, I think the ability of a human to generalize the cost benefit of a situation into a functional form...i.e., by saying, "oh, if I had n units of ore, I could sell them at the station for 2n credits!" is simply...incredible. Not entirely sure how I'll deal with it yet, but, as always, the solution will present itself in due time with enough careful thought :)
Maybe I'm just not getting something but I don't see why the AI would want to go back and forth nor the need to generalize n units of ore = 2n credits. I'm not sure where the AI got the number "11" in your 11 units of ore = 22 credits but wouldn't using the AI's current cargo capacity make more sense? If the AI has a ship that can hold 15 units of ore it should not mine 11 (where did the 11 even come from?) then get half way back and decide it wants 15. One would think that once it decides it is going to mine (whatever magic makes that happen) that it would mine the number of units it's cargo hold can hold (unless no more was available) and then there will be no temptation to keep turning back because either there is no more room in the hold or there is no more ore to mine to tempt it.
Post

Re: AI (from Monday Dev Log)

#2
The 11 probably has to do with the goal the NPC set for itself. Perhaps it could buy a rocket that smashes asteroids to bits for 11cr, and wanted to buy that to be more productive at mining.
However, when talking about productivity, it needs to take into account the movement needed as well. if the NPC goes back and forth a few times, it doesn't seem to understand that having to move has an impact on its productivity.
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Post

Re: AI (from Monday Dev Log)

#3
Katorone wrote:The 11 probably has to do with the goal the NPC set for itself. Perhaps it could buy a rocket that smashes asteroids to bits for 11cr, and wanted to buy that to be more productive at mining.
However, when talking about productivity, it needs to take into account the movement needed as well. if the NPC goes back and forth a few times, it doesn't seem to understand that having to move has an impact on its productivity.
Ok so in your example lets say the AI decides it wants a rocket that smashes asteroids to bits so it can be more productive at mining. That rocket costs 22cr (I think that's what you meant) which means it needs 11 ore. Then I would think the next step would be to ensure it's hold has room for 11 ore. I'm saying that if it's 11 or greater instead of using the 11 when it sets out to actually mine it should just resolve to fill it's hold instead of just getting specifically 11. If the hold's capacity is less then 11 then sure it would take multiple trips (might even add a goal to get money for a bigger hold) but even then if the capacity is say 8 it shouldn't do one trip for 8 and then a second for 3 so it gets the 11 it needs. It should go ahead and do two trips for 8. The 11 should be just used to drive the number of trips it needs to make not the specific amount of ore it gets because once the decision is made to make 1 or 2 or however many trips the immediate goal within that trip should be to fill the hold.
Post

Re: AI (from Monday Dev Log)

#4
Yep, that would be the most productive way of doing things... unless it's a very small distance between the station that buys the ore and the asteroid it's mining.
In some cases (depending on the expected efficiency gain of the rocket), the miner would be more productive to only fill it's bay up to where needed, and stop mining.

Like in minecraft, you made a wooden pick and mined some stone. It's more productive to throw away the wooden pick and make a stone one, even if there are only 2 uses of the wooden pick used.
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Post

Re: AI (from Monday Dev Log)

#5
This is what I keep trying to say in the logs: many of the "hard problems" in AI you take for granted and consider silly or easy. But they're not :geek:

Giving the AI maximal freedom means not forcing it to arbitrarily mine until full each time.

From the AI's perspective, if it can only sell 11 units of ore, then anything that it mines on top of that is worthless. You say keep mining because you think ore is worth something. That's not necessarily true! The AI's actually right: if there really were nothing that it could do with more than 11 units, why would it waste time mining more? You see, it's actually being quite efficient. It just sometimes fails to recognize that more ore is still valuable. It is a problem of valuation in the presence of actions that have numeric ranges.

Every AI problem looks trivial from the outside...I think that's why each dev log lately has spawned a new thread suggesting that the problems were silly :lol: :ghost:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: AI (from Monday Dev Log)

#6
From your overall description of your AI, it seems like your AI is running into a "time preference" problem. Most people have immediate, intermediate, and long term goals. Could it be that the AI is updating its immediate goal (make a bunch of credits) too often? Perhaps it just needs a way to be satisfied with what it has. For example, the AI sets a goal and a timeframe for that goal - the time frame being x. X will be at least as long as the previous amount of time it took to complete the last goal but not longer than half the time the AI has been functioning. This way the AI sets goals that are longer and longer in term and hopefully grander in scale.
The short question: "What is truth?"
The short answer: In the beginning was the Word, and the Word was with God, and the Word was God.
Post

Re: AI (from Monday Dev Log)

#7
JoshParnell wrote:This is what I keep trying to say in the logs: many of the "hard problems" in AI you take for granted and consider silly or easy. But they're not :geek:

Giving the AI maximal freedom means not forcing it to arbitrarily mine until full each time.

From the AI's perspective, if it can only sell 11 units of ore, then anything that it mines on top of that is worthless. You say keep mining because you think ore is worth something. That's not necessarily true! The AI's actually right: if there really were nothing that it could do with more than 11 units, why would it waste time mining more? You see, it's actually being quite efficient. It just sometimes fails to recognize that more ore is still valuable. It is a problem of valuation in the presence of actions that have numeric ranges.

Every AI problem looks trivial from the outside...I think that's why each dev log lately has spawned a new thread suggesting that the problems were silly :lol: :ghost:
First let me say I didn't mean to imply that the situation was silly. If I did I apologize. My assumption in fact was that my understanding was incorrect and I was posting for insight into why my assumptions were wrong.

That said in your clarification I guess I don't understand why the computer would deem 11 is valuable and the remaining capacity worthless and then change that valuation mid-run so that it suddenly turns back to get more. If the AI was in fact right as you say and efficiently getting only the 11 ore that was valuable why would it turn back to get 15... what suddenly changed that made those 4 extra units become valuable when they explicitly were not before? Also how did the AI become aware of that change?
Post

Re: AI (from Monday Dev Log)

#8
JoshParnell wrote:This is what I keep trying to say in the logs: many of the "hard problems" in AI you take for granted and consider silly or easy. But they're not :geek:

Giving the AI maximal freedom means not forcing it to arbitrarily mine until full each time.

From the AI's perspective, if it can only sell 11 units of ore, then anything that it mines on top of that is worthless. You say keep mining because you think ore is worth something. That's not necessarily true! The AI's actually right: if there really were nothing that it could do with more than 11 units, why would it waste time mining more? You see, it's actually being quite efficient. It just sometimes fails to recognize that more ore is still valuable. It is a problem of valuation in the presence of actions that have numeric ranges.

Every AI problem looks trivial from the outside...I think that's why each dev log lately has spawned a new thread suggesting that the problems were silly :lol: :ghost:
Yeah but doesn't it get "Space-Credits" for selling that ore?
I don't think it is an arbitrary imposed limit if the ai mines until full each time, it's just the most profitable method of gaining funds.
It doesn't need to be a hard constraint, it can just be a very high weighted option, full cargo hold = very high weight in the decision making of how much to mine.
If it's already in an asteroid field with profitable ores, it is actually to be considered stupid NOT to mine until full, if it already has a plan to sell it at a station anyway.
The same logic applies to trading. Let's take X Rebirth as an example.
If you dock at a fully loaded solar power plant selling energy cells, and your hold can carry 10k energy cells (and your funds allow it).
AND you already have a destination of where to sell said energy cells for profit.
Would you not agree that it would be utter dumb logic to NOT fill the cargo hold with something which is essentially guaranteed profit?
It may be "free intelligence" if the ai has a chance to decide to only buy 280 energy cells, but it'd be a dumb intelligence. It'd be free for the sake of being free, not for the sake of making the best decisions or even having basic logic we attribute to intelligent behavior. Even a klingon would know better!
And certainly a player that would observe this behavior would simply say "this ai sucks", because it would make such an illogical unprofitable decision.
Sure it's "free", but at what price? Free and making stupid decisions.

I think we can all agree that any "free intelligence" would still have certain core principles based on sound logic.
It is illogical to only mine half your cargohold and then leave the rest empty and worthless while flying to a station that buys said ore.
It's basic logic and "intelligent behavior" to fill up to get maximum profit, even if said profits go over what is actually needed.
A surplus of profit is not a bad or stupid thing, it's to be desired. Savings for the future.

So if the AI had one little set "rule" that said, mine until full, would actually make it appear more intelligent, even if it didn't have 100% freedom.
I mean in real life we humans don't have 100% freedom in that situation, we're also governed and "pre-programmed" by logic.
If we see two diamonds on the ground, we will pick up both of them. Even if we know we only need one of the diamonds to buy that car we were planning to buy, we will still always pick up both diamonds. Because it's double profit, maximum profit. There's no point to only pick up one of them if there are no other outside forces acting upon this situation.

See what i mean? It's not really about obsessing about pure freedom, it's about making sure basic core principles of intelligent logic is adhered to.
Otherwise a purely 100% free ai that does NOT take into account basic intelligent logic, would always do stupid stuff like that.
It needs some guidelines of what is logical and what is simply irrational.
Last edited by Baleur on Wed Nov 20, 2013 5:25 am, edited 1 time in total.
Post

Re: AI (from Monday Dev Log)

#9
But how do you determine if remaining in the asteroid field mining ore would yield a better return on your time as opposed to buying enough for that shiny cannon to start doing dogfighting missions, which may yield more (in the AI's brain) per unit of time?
In Josh we trust.
Post

Re: AI (from Monday Dev Log)

#11
Baleur wrote: So if the AI had one little set "rule" that said, mine until full, would actually make it appear more intelligent, even if it didn't have 100% freedom.
I mean in real life we humans don't have 100% freedom in that situation, we're also governed and "pre-programmed" by logic.
If we see two diamonds on the ground, we will pick up both of them. Even if we know we only need one of the diamonds to buy that car we were planning to buy, we will still always pick up both diamonds. Because it's double profit, maximum profit. There's no point to only pick up one of them if there are no other outside forces acting upon this situation.
in danger of starting another 20 pages of philosophy and darwinism discussion i say:

what if the person is member of a species that gounds upon altruism or are very frugal people? what if he thinks "yeah, i have my new car, ill leave the other diamond, maybe somone else needs it more than me"
then ot would be illogical for him to take the other diamond. its still logical for humans but simulation an infinite universe with infinite species living in it we cannot impose our human paths of thought into it.
not imposing them is very hard for an AI programmed by humans, but we can try ^^

(that does not devalue the whole problem with jumpy AI decisions, just to show the issue wit infinite species with infinite ways of thought)

but for solving the problem with the AI cannot decide to mine or not i favour your idea about giving the full cargo hold a high desirability value
Post

Re: AI (from Monday Dev Log)

#12
I think that there definitely needs to be some "stupid" AI in the game.. but these AI could simply be "drones/slaves" controlled by a hive/foreman AI. Let's take the miners as an example.. really, the most common miner AI is not going to be an independant agent.. they're going to be a slave or a worker owned/employed by a company who directs their actions. Yes, you're still going to need the AI to decide which particular asteroid to harvest, when to run if attacked, when to fight if attacked, obstacles to avoid, best routes and so on.. but the tasks themselves are assigned to them by master agent/entity. This can be applied to a lot of the different AI agents in the game.. basically like fish swimming around feeding.. they're not really making independant decisions for themselves other than reacting to their environment (ok.. maybe the fish analogy is wrong.. whatever.. hehe).

In any case, as I was reading the dev log and some of the comments here, I was curious if the idea of these less structured AI had been overlooked.. and through these less structured (or managed) AI, might be a stepping stone towards an answer to the more complex, structured and self managed AI. If you think about it.. even a self-managed AI has a brain that manages the tasks.. so the captain of the ship is going to set the tasks and then the crew is going to go about getting those tasks done.

I guess what I am also getting at is that the bulk of the AI in the game doesn't need to be complex, multi-structured AI that is able to complete a myriad of tasks.. they're just going to be workhorses for the different factions and specialisations of each area in space.
Post

Re: AI (from Monday Dev Log)

#13
light487 wrote:I think that there definitely needs to be some "stupid" AI in the game.. but these AI could simply be "drones/slaves" controlled by a hive/foreman AI. Let's take the miners as an example.. really, the most common miner AI is not going to be an independant agent.. they're going to be a slave or a worker owned/employed by a company who directs their actions. Yes, you're still going to need the AI to decide which particular asteroid to harvest, when to run if attacked, when to fight if attacked, obstacles to avoid, best routes and so on.. but the tasks themselves are assigned to them by master agent/entity. This can be applied to a lot of the different AI agents in the game.. basically like fish swimming around feeding.. they're not really making independant decisions for themselves other than reacting to their environment (ok.. maybe the fish analogy is wrong.. whatever.. hehe).

In any case, as I was reading the dev log and some of the comments here, I was curious if the idea of these less structured AI had been overlooked.. and through these less structured (or managed) AI, might be a stepping stone towards an answer to the more complex, structured and self managed AI. If you think about it.. even a self-managed AI has a brain that manages the tasks.. so the captain of the ship is going to set the tasks and then the crew is going to go about getting those tasks done.

I guess what I am also getting at is that the bulk of the AI in the game doesn't need to be complex, multi-structured AI that is able to complete a myriad of tasks.. they're just going to be workhorses for the different factions and specialisations of each area in space.
Although that's been the traditional approach that games take, my view on it is that you do "real AI" or you don't. I understand the notion of having some overload NPCs being smarter and such, but I don't like the idea of "most" NPCs having a different / less-capable driving algorithm. I don't want to see lots of NPCs running around and think "which ones of these are alive? I want to see them and know that they all are :D

That power structure of which you speak is still going to emerge naturally, because I will give some NPCs more "neurons" and such so that they will make deeper and more accurate decisions. This should lead to them ultimately being able to control a lot of "less smart" workers by hiring. But to construct two different types of AI - one "stupid" and one "smart" is, IMO, counterproductive to the soul of this game :)

The current AI should be scalable enough that a similar effect can be achieved even while individual actors maintain the ability to think for themselves :thumbup:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: AI (from Monday Dev Log)

#14
Just a brainfart, but... Are NPCs jealous?

Will criminal NPCs rather target members of rich factions? Does a political agenda influence how much piracy there is?

Are factory owners automatically part of a faction, or just in a faction's space? Meaning that an NPC can have factories in the space of multiple factions, without being tied in reputation to these factions?
If the latter, then perhaps violence can happen more against shipments/stations/representatives of the richest? (Including the player at the point he becomes rich enough to warrant some jealousy.)

If factions are consolidation of station owners which have created their own military branch, will some sectors be under control of multiple factions?
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Post

Re: AI (from Monday Dev Log)

#15
JoshParnell wrote: That power structure of which you speak is still going to emerge naturally, because I will give some NPCs more "neurons" and such so that they will make deeper and more accurate decisions.
Are you basing the NPC AI on ANN's then, or are "neurons" used for something completely different? A colleague and I left ours doing parameter optimisation in the labs overnight and I really ought to get out of bed and go check on it... :?

Online Now

Users browsing this forum: No registered users and 16 guests

cron