Return to “Technical”

Post

Some More Tech Details (AI, Etc)

#1
Okay, so I ran across this thread on another forum (someone linked to it on kickstarter comments):

http://www.matrixgames.com/forums/tm.asp?m=3221975

Not posting it here to drum up support for Josh or anything (I strongly advise you just skip over anything posted by Kayoz, don't sink to his level), but I did find Josh's posts in the thread on pages 2-4 to be pretty informative.

He goes into some small depth on his algorithms for AI NPC Pathfinding, Trading, etc.

Anyway, it was some details I hadn't seen posted elsewhere yet.

Here are some choice excerpts:
JoshParnell wrote:As for the Limit Theory AI, it uses an even simpler model for high-level AI, which is nonetheless absurdly powerful. The core of LT AI is a planning engine, in which high-level goals are formulated as game state differentials, and then a set of heuristics is called upon to turn a game state differential into a sequence of concrete actions. For example, an obvious heuristic is that if a goal is to modify the location of oneself, the "solution" is to "travel" to the desired location. It's effortless to think of an AI model in this way, and equally effortless to implement. But I claim that the results are impressive and fast. I guess that's the part that I'll have to prove!
JoshParnell wrote:I understand the "how to fly" might seem like a difficult problem if you haven't implemented it. The truth, however, is that it's fantastically simple. The underlying methodology is that, at all times, you have several AI "substrategies" that get to submit votes on a heading. The votes are aggregated as a weighted average, and the current heading is exponentially smoothed with the new heading, as determined by this aggregation. Now, to determine heading, we have several different types of behaviors. Dodging around obstacles, as you mentioned, is implemented by performing a proximity query on the ship, then selecting an obstacle that is relatively close, choosing a random point on the surface of it's world-space AABB, then voting for a heading in the direction of that point. This provides compelling "dodge-em" mechanics. Trying to hit your flanks, of course, is completely trivial - one sets the heading to point towards the target ship. Or, better yet, a random point on the surface of the target ship's world-space AABB, which provides interesting variation when the target is a large ship. Now, there are also concurrent substrategies submitting votes to achieve obstacle avoidance, or for maintaining a formation, or whatever other behavior you'd like. In either case, I'd be happy to explain to you exactly how the heading is computed if you think it's difficult.

As for trading. Here's a simple model: suppose the NPC has a set of known locations. Randomly select some subset of these locations (for variability). Choose some subset of trade goods (perhaps the NPC deals in a certain type of good; it's trivial to generate such a set). Compute the good with the largest price differential among the locations, or, perhaps, the largest price differential per unit volume (again, it's obviously simple, just an outer loop over goods and an inner loop over locations). Now, invoke a "trade" strategy, where the good is the chosen good with maximal price differential, the "source" is the location with the lowest price, and the destination is the planet with the highest price. Other AI strategies, e.g. "TravelTo" will perform the rest of the work. Of course, this is a very simple algorithm, and the algorithms in LT are more complex. Nonetheless, it is a perfectly valid way to determine "what goods the NPC traders and carrying and to where."
JoshParnell wrote:
HanBarca wrote: 1. distance
how much it costs to bring the goods there?
2. risk
Is the source planet safe ? And the destination?
3. Offer
How is the availability of the good on the source planet ? How much is the cost going to increase if other traders buy it ?
4. Demand
How is the demand on the destination planet ? Is the market going to be saturated by excessive offer or by other traders ?
5. Other sources
If the transport costs raise the final price by 30%, would the NPC goods be more expensive than the same item taken from a source nearer and maybe unaccesible to the NPC?

I'm not saying the above points aren't manageable, but even the basic economic model looks to me a little more complicated than you think.
Sure! These are all great extensions to the basic algorithm! But surely you can see that they're all easy!

What we will want to do is compute, instead of maximal price differential, maximal "appeal" (this is actually what the engine uses at the moment). The appeal is just a function of several variables that outputs a scalar that represents how favorable the trade is. To compute it, we can take all of the above (and more) into account without a problem!

1. Distance
We already have a graph for calculating distance to various destinations, so you can factor this into the appeal function. Note that we will actually compute travel time, not distance, because that's what matters (but that's also what the pathfinding graph already considers). So we will divide the "appeal" equation by this travel time, so as to turn the computation into a computation of "value per unit time spent on the trade."

2. Risk
Sure! We take the NPC's faction, and look up the source and destination planets' factional disposition towards the NPC's faction. We can, for example, factor this in by multiplying by 1-e^(-k*disposition), where 0 means worst possible disposition, hence, this component will be zero (we never go there), and infinity means best possible disposition, hence, we have no qualms about going to this planet. If the NPC is not associated with a faction, we can do something simpler like take the security rating of the system that the planets lie in.

3. Offer
I contend that this isn't really a factor, since the price will already reflect this.

4. Demand
Again, I contend that it isn't a factor, because the price already reflects it.

5. Other Sources
It's actually an emergent property of the algorithm we've already discussed, not a special case. If we factor in distance, as we did above, then NPCs will be less likely to make a long-distance trade. That means that, if the only source of some good is far away, the supply will be thinner, hence the price higher. So yes, if the player (or an NPC) finds a new source of the good that is closer, they will be in good shape to make a profit! That's part of what makes exploration so appealing. And I think this is a very desirable property (it's no different from real life).

One thing that I want to point out is that, often, implementing the right features results in the emergence of other features. We could probably find a bunch of cool consequences of implementing 1. and 2., but we didn't have to do any extra work to achieve them!

I hope this gives some sense of how easy it is to extend the basic economic model to something complex! If you have other ideas, feel free to throw them out and we can explore the ramifications.
- The Snark Knight

"Look upward, and share the wonders I've seen."
Post

Re: Some More Tech Details (AI, Etc)

#3
(I strongly advise you just skip over anything posted by Kayoz,
I like this project and where it is heading, but after reading everything 'Kayoz' said, It's still all true.
Josh is a young, largely inexperienced coder taking on a project that any sane game developer would say is too big for a one man team.
However, the progress he's made is great.
Now that its reached its kickstarter goal, it will go though (unless kickstarter take it down for some reason, which I highly doubt they will). If it does go through, that doesn't automatically mean the game *is going to be made*. Kickstarter have no control or legal obligations for any of the projects after they've been funded. So if the project ends up falling over, you all just lose your money, and Josh is made out to be an asshole (unless of course he offers refunds).
But, If he were to disappear from the face of the earth tomorrow, it would just be bad luck to all who pledged.
While having a pessimistic angle to the project, Kayoz is absolutely right in everything that he says.

Anyway, I am still looking forward to the project. I have not backed myself, because I myself am a little held back from backing such a large project, being tackled by such a young and new developer. Loving the progress so far, can't wait to try it out.
Post

Re: Some More Tech Details (AI, Etc)

#4
Yeah, we're all taking a risk here.
(Then again, have pledged about what I'd pay for a night on the town, so I think I'd live it down if this project dies prematurely...)

However, there are other crazy dreamers out there, who actually managed to put together a working product no too dissimilar from what Josh is planning here. Check the Evochron Series, which is more-or-less also a one-man-show project and written in DarkBasic to boot, or the two Flatspace games, which were also written by a single person (who also composed the music). Kinetic Void was also backed on Kickstarter, has a similar theme and scope as Limit Theory, and is done by 4 people. And yes, they're on Steam Greelight and about to deliver a working alpha soonish.

Hell, Minecraft was written by Notch alone before he hit it big and could afford to hire more people.

It's not much of a surprise both of those rely heavily on procedural generation and randomization, as it cuts down the workload for the developer. Besides, back when I started, most "good" games were written by a handful of people in their garages and bedrooms. I consider it a fallacy that game development must cost millions of dollars in order to deliver a fun, worthwhile product. On the contrary, more often than not you get a flat, shallow yet highly polished turd for all that money. Visuals aren't everything, yet those eat most of the time and money nowadays.

Josh presented a business plan, had worked on his project before coming to Kickstarter, and presented a decent sales pitch. So, he gets a chance - and if I'm lucky, I get a nice space sandbox game out if it. I figure my chances on getting a finished product aren't that bad, really.
Hardenberg was my name
And Terra was my nation
Deep space is my dwelling place
The stars my destination
Post

Re: Some More Tech Details (AI, Etc)

#5
GRIMshadow wrote:
(I strongly advise you just skip over anything posted by Kayoz,
I like this project and where it is heading, but after reading everything 'Kayoz' said, It's still all true.
Josh is a young, largely inexperienced coder taking on a project that any sane game developer would say is too big for a one man team.
However, the progress he's made is great.
Now that its reached its kickstarter goal, it will go though (unless kickstarter take it down for some reason, which I highly doubt they will). If it does go through, that doesn't automatically mean the game *is going to be made*. Kickstarter have no control or legal obligations for any of the projects after they've been funded. So if the project ends up falling over, you all just lose your money, and Josh is made out to be an asshole (unless of course he offers refunds).
But, If he were to disappear from the face of the earth tomorrow, it would just be bad luck to all who pledged.
While having a pessimistic angle to the project, Kayoz is absolutely right in everything that he says.

Anyway, I am still looking forward to the project. I have not backed myself, because I myself am a little held back from backing such a large project, being tackled by such a young and new developer. Loving the progress so far, can't wait to try it out.
http://www.kickstarter.com/help/faq/kic ... asics#Acco

Kickstarter have no legal obligations, Josh does though. Whether the product is going to be to your liking is a gamble, losing money to a project that never finishes isn't,
Image
FAQ | Kickstarter | IRC | Common Suggestions
Post

Re: Some More Tech Details (AI, Etc)

#6
Kickstarter does not guarantee projects or investigate a creator's ability to complete their project. On Kickstarter, backers (you!) ultimately decide the validity and worthiness of a project by whether they decide to fund it.
"Yes. Kickstarter's Terms of Use require creators to fulfill all rewards of their project or refund any backer whose reward they do not or cannot fulfill"
"If the problems are severe enough that the creator can't fulfill their project, creators need to find a resolution. Steps could include offering refunds, detailing exactly how funds were used, and other actions to satisfy backers. "
Image
There is no legal obligation, for kickstarter, or for Josh.

His reputation is all that is at stake, and there is only a possibility of legal action, coming from a backer or someone who feels the need to take legal action.

It's the same as if, I'm not legally obliged to pay a waitress a tip (at least where I come from), but they could sue me, if they felt the need. It would be pointless, but they still could.


This is the danger in crowd funding. There are no legal obligations of any kind from any party.


tl;dr
Reputation is all that is at stake, and legal action is only a possibility if someone decides to pursue (if the project is unsuccessful and no refunds are offered)
Post

Re: Some More Tech Details (AI, Etc)

#7
GRIMshadow wrote:
Kickstarter does not guarantee projects or investigate a creator's ability to complete their project. On Kickstarter, backers (you!) ultimately decide the validity and worthiness of a project by whether they decide to fund it.
"Yes. Kickstarter's Terms of Use require creators to fulfill all rewards of their project or refund any backer whose reward they do not or cannot fulfill"
"If the problems are severe enough that the creator can't fulfill their project, creators need to find a resolution. Steps could include offering refunds, detailing exactly how funds were used, and other actions to satisfy backers. "
Image
There is no legal obligation, for kickstarter, or for Josh.

His reputation is all that is at stake, and there is only a possibility of legal action, coming from a backer or someone who feels the need to take legal action.

It's the same as if, I'm not legally obliged to pay a waitress a tip (at least where I come from), but they could sue me, if they felt the need. It would be pointless, but they still could.


This is the danger in crowd funding. There are no legal obligations of any kind from any party.


tl;dr
Reputation is all that is at stake, and legal action is only a possibility if someone decides to pursue (if the project is unsuccessful and no refunds are offered)
Legal action is always a possiblity when a contract is not fulfilled. Any backer (and only backers have this option) could make a tort claim for contractual breach if Josh were to not fulfil the reward agreement associated with their pledge, provided they selected a reward that includes delivery of good or services (like a copy of the finished game). Regardless of whether Josh were to offer a refund, there absolutely is contractual liability involved in the Kickstarter pledge, at least in the United States.
I am 42.
Post

Re: Some More Tech Details (AI, Etc)

#8
I see things on KickStarter to be more of an Angel Investor type. You give money, knowing that some projects never come to fruition. I believe the risk should only be on the backers. I know that's not the way it is, but this is just my beliefs.
Image
Early Spring - 1055: Well, I made it to Boatmurdered, and my initial impressions can be set forth in three words: What. The. F*ck.
Post

Re: Some More Tech Details (AI, Etc)

#9
My limited understanding of all things legal left me thinking that I am under a legal obligation to deliver the goods that I have promised to you all. Whether a lawsuit would be fruitless or not, I don't really know, as I've yet to see this kind of thing happen, so I'm not sure if there's really a precedent for this? But I would indeed encourage you all to take me to court if I don't fulfill. By all means, I am under the impression that more than my reputation is at stake (and still, reputation is huge).

At any rate, my point of contention with Kayoz was not his skepticism. I can understand skepticism, honestly. LT is promising a lot. But Kayoz stepped a good bit over the line when he started pretending to know about game development. I am more than willing to accept anyone's skepticism, but the minute I hear claims about "X and Y are too hard, they're so complicated, he will run into lots of trouble" etc. etc., I am going to challenge them. First and foremost, I will challenge them because I am well aware of the remarkable human ability to fabricate claims without any experience whatsoever in the subject matter. Second, I will challenge them because, as you all can see, LT is well underway...and to imply that everything I've done so far is trivial, while everything I've yet to do is impossible...well, err, what?

No doubt, Limit Theory is a huge project! I have no problem with people pointing that out and hey, if you feel more comfortable waiting until release time to pick up a copy, please do so! But leave it at that. To pretend to be an expert in the field and start talking about imaginary complications that I'll suddenly run into...it's insulting, really, because I deal with real complications in real code everyday.

Sorry if I come off strongly on this issue! It just gets me riled :shock:
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford
Post

Re: Some More Tech Details (AI, Etc)

#10
I'm confident that you, Josh, are dedicated to this project enough to deliver a satisfactory product. You might be relatively new to the gaming scene, but the whole point of even starting a Kickstarter is to gain attention (and funds) in order to produce a new product.

You've got $121k worth of faith and 3,648 people worth of support behind you at the moment. You wouldn't have gotten that investment if everyone thought you were a noob code monkey who couldn't write a batch file.

As long as you don't abuse that trust (that is, as long as you deliver a product), you're safe.
And you get the added bonus of showing people like Kayoz that they're wrong.
Shameless Self-Promotion 0/ magenta 0/ Forum Rules & Game FAQ
Post

Re: Some More Tech Details (AI, Etc)

#11
JoshParnell wrote:Sorry if I come off strongly on this issue! It just gets me riled :shock:
Not at all, we prefer you speaking your mind were here to back you imn more ways than just financial XD were in this with you (as backers) and want to see you succeed. and who better knows what your capable of than you? keep up the great work and know were all excited with what we see and read here.

PS: I know i dont speak for everyone but i hope my view on this at least speaks for the majority of us XD
If I've rambled and gone off topic im sorry but i tend to be long winded as you might notice if you stumble across my other post XD. thanks for reading.
Post

Re: Some More Tech Details (AI, Etc)

#12
Thanks Josh, that really clears a few things up.

While I don't have *experience* with a lot of these things, I do have an understanding (albeit general) of how complicated some of these things are, especially in comparison to other things.
Still, for someone such as yourself to tackle it by yourself, as well as everything else is no small feat. Things such as AI and pathfinding usually have whole teams dedicated to them (I would think).

I'm no professional, I won't even pretend to be, but I do know to an extent the difficulties you face, as a fellow aspiring game developer.
Post

Re: Some More Tech Details (AI, Etc)

#13
JoshParnell wrote:Sorry if I come off strongly on this issue! It just gets me riled :shock:
Dadalos wrote:Not at all, we prefer you speaking your mind were here to back you imn more ways than just financial XD were in this with you (as backers) and want to see you succeed. and who better knows what your capable of than you? keep up the great work and know were all excited with what we see and read here.
You either speak your mind, or you end up like so many other aspiring game developers that cave to fan demand and end up with a project twice as big. I give you respect in more ways than just a fellow aspiring game dev.
Image
Early Spring - 1055: Well, I made it to Boatmurdered, and my initial impressions can be set forth in three words: What. The. F*ck.
Post

Re: Some More Tech Details (AI, Etc)

#14
So many people think that something is impossible, until someone does it, then everyone sees that it is possible and society as a whole advances. I am not quite sure that developing Limit Theory is in the same league as some of the "impossible" things that have been done in modern physics / engineering, but for anyone to write it off as impossible is just stupid.

Personally I think it is far from impossible, and I think that Josh has shown full well that he has the abilities to do this development.

The biggest thing that got to me in the discussion with Kayoz was when Kayoz was speculating that it could all be a con, never entered my mind in the first place, but from a link somewhere in a thread just after that I was browsing through this stuff from Josh: http://anewmusic.com/ and look back through almost 3 years of posts.... seriously a con job would be easier!

Josh, people believe in you, and personally I believe in what you are doing because if I didn't then I also couldn't believe that I could do similar.
Post

Re: Some More Tech Details (AI, Etc)

#15
JoshParnell wrote:I understand the "how to fly" might seem like a difficult problem if you haven't implemented it. The truth, however, is that it's fantastically simple.
I never had trouble getting things flying from A to B, either.
With a single attacking ship, that's pretty much all it takes.

The tricky bits are to make several ships pursue a common strategy, use teamwork, and apply this in a 3D space.

An example would be the MARS drones I created. The mothership (maybe some destroyer) sends out fast little drones to engage and delay enemies that it could never catch itself.
The player can also send multiple drones to engage an enemy.
If you send 3 drones after a fighter, all will engage the enemy. As soon as it reacts to that and starts chasing one of them, the chased drone will flip and run a zig zag course back to a point behind the mothership while the other 2 drones keep harassing the enemy.
Should the enemy turn on one of the other drones, they switch roles and another drone leads the enemy towards the mothership... with it's many big guns.

It's a very simple plan but it's a coordinated action with several ships.
"Real" fighting ships are much more complicated. In X3 (and many other games) they have no common strategy whatsoever. It's just a mass of individual red dots.
There is no "I" in Tea. That would be gross.

Online Now

Users browsing this forum: No registered users and 6 guests

cron