Limit Theory

Gamers can also use this forum to chat about any game related subject, news, rumours etc.

Moderator: maddog986

User avatar
fvianello
Posts: 534
Joined: Tue Aug 06, 2002 12:23 pm
Location: Italy

RE: Limit Theory

Post by fvianello »

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."

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.
H. Barca,
Surplus Consuls Dispatcher
JoshParnell
Posts: 21
Joined: Fri Nov 30, 2012 5:31 pm

RE: Limit Theory

Post by JoshParnell »

ORIGINAL: Kayoz
Let's take a closer look at this one.

"Compute the good with the largest price differential among the locations... destination is the planet with the highest price. "

Given this method, and the player has opened up a newly generated area with a high price for the good in question, and let's put it quite far from the center of the explored/generated areas. You'll have a swarm of traders headed there - since they're all using the same decision making method.

Now, that's only one problem that your implementation will run afoul. There will be dozens, hundreds more as the code invariably grows. Whether or not you can spot them early in the dev cycle and what you have to do to kludge a fix in later on, is another question.

Sorry, I'm not sure I understand the problem. You say that the player places, for example, a factory station that is in a remote system, and sets the station to offer a higher-than-average price for delivery of a certain good, is that correct?

Yes, as you point out, a good number of traders will then recognize and aim to exploit this differential. Not all traders, mind you, because the algorithm I gave only selects a subset of locations to consider, so not all traders will consider the player's factory at once. But yes, you will have a fair number of traders competing to exploit this differential. How is that unacceptable, or different from real life? If Wal-Mart offered to pay people $5 for every empty Coke can they brought in, I'm sure we'd see a pretty substantial rush on Wal-Mart, regardless of how remote it might be!

Again, perhaps I'm not understanding, but it doesn't seem like a problem to me - the behavior is as expected. In fact, it points to a desirable property of the simple algorithm I gave. If you offer to pay significantly higher than market price for a good, yes, you will see an influx of trade. This is great to know if, for example, you need to have goods rushed to your station quickly. You can set a high price to intentionally create this behavior!
ORIGINAL: Kayoz
These sorts of issues will come up exponentially as the project grows, and discussing one or another method is pointless - which is why I said "clouds of fog". The details of one issue is besides the point. What is relevant, is that you intend to do all of this on your own and with no experience of your own or of others to guide you. Somehow you think you'll manage to do what very few novice programmers can do - keep the "big picture" firmly in their mind whilst coding the minutae. That's worrying.

No, not really, it's not at all pointless. Look, we're finally having an actual discussion, about actual content! You can wave your hands all you want and say things are difficult, but if you can't provide any evidence, how is that any different from what you've accused me of doing?

The details of one issue are not beside the point. We can have a talk about why it's actually not an issue. The issue is that you're generating issues! Which makes it very much productive to discuss, for example, the 'issue' that you just brought up.
JoshParnell
Posts: 21
Joined: Fri Nov 30, 2012 5:31 pm

RE: Limit Theory

Post by JoshParnell »

ORIGINAL: Lucian

Ok Josh, now that Kayoz and I are best-est buddies, let me play devil's advocate for a moment.

I do have concerns about something you said earlier about path finding not being an issue. My problem is that in the old Elite games, it was almost impossible to avoid having the AI smack your ships straight into planets and stations, often at several Km/sec.

So for the Elite team, it wasn't trivial, in fact they never managed to solve the issue through several iterations of games. The AI simply couldn't navigate. The X3 Terran Conflict autopilot is a little better, but they don't call it the "Auto Pillock" for nothing.

Could you tell us why these issues wont be a problem for LT? Has technology advanced sufficiently so that it's a non-issue?

Sure! It won't be an issue because I have a nice, compact algorithm for solving collision avoidance. I won't give it away, because, AFAIK, it's not been used in other games (maybe it has, but I haven't seen it mentioned in any game AI books that I've read). But I'm uploading a new tech demo at the moment and, incidentally, there's a moment in the demo where you can see a very good example of it in action, where an AI pilot recognizes that he is about to slam into an asteroid, and performs a rather timely maneuver to successfully avoid it. I'll let you know the time marker when I finished uploading.
JoshParnell
Posts: 21
Joined: Fri Nov 30, 2012 5:31 pm

RE: Limit Theory

Post by JoshParnell »

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.
User avatar
fvianello
Posts: 534
Joined: Tue Aug 06, 2002 12:23 pm
Location: Italy

RE: Limit Theory

Post by fvianello »

Ok, now I got it.
H. Barca,
Surplus Consuls Dispatcher
t001001001
Posts: 322
Joined: Thu Apr 30, 2009 7:06 pm

RE: Limit Theory

Post by t001001001 »

I know nothing of programming games. I marvel at the art.

You've made a good show of yourself in this thread Mr Parnell. Kayoz seems like a jerk.

I'm a layman just reading the thread it's my opinion. I think everyone has done things in their life w/ ppl telling im it can't be done. Screw im. Do it anyway. Best wishes, man.
JoshParnell
Posts: 21
Joined: Fri Nov 30, 2012 5:31 pm

RE: Limit Theory

Post by JoshParnell »

ORIGINAL: Lucian
I do have concerns about something you said earlier about path finding not being an issue. My problem is that in the old Elite games, it was almost impossible to avoid having the AI smack your ships straight into planets and stations, often at several Km/sec.

So for the Elite team, it wasn't trivial, in fact they never managed to solve the issue through several iterations of games. The AI simply couldn't navigate. The X3 Terran Conflict autopilot is a little better, but they don't call it the "Auto Pillock" for nothing.

Could you tell us why these issues wont be a problem for LT? Has technology advanced sufficiently so that it's a non-issue?

Alrighty, http://youtu.be/s4FPq9nfcps?hd=1&t=1m47s . Watch the guy on the left when he comes back into view. He's pretty much barelling toward that asteroid, luckily the avoidance algorithm kicks in and he pulls off a pretty cool maneuver and makes it out alive :)
Lucian
Posts: 279
Joined: Sat Dec 01, 2012 11:35 am

RE: Limit Theory

Post by Lucian »

Well there's nothing like cold, hard evidence to support your claims, I'm convinced, that really seemed to work well. The guy in the fighter seemed to know that he was heading for an asteroid and clearly took measures to avoid a collision. Well done.

If he can avoid an asteroid he can most certainly avoid a planet. Actually that was quite an impressive video in general, just a bit more feedback and random thoughts that occurred to me as I watched.

-Loved the explosions, it looks a lot like I would imagine a nuke to look going off in space, very cool!
-Really loved the way that time slows down when you enter the command interface, that's going to be critical during those oh-so-important frantic battles where you most certainly DON'T want to struggle with the interface to accomplish something that in reality would take you only split-seconds. You have modeled this well in LT as opposed to say X3 Terran conflict which has a similar way of commanding ships in your fleet, but makes it so complicated and time consuming that it becomes very frustrating.
-What about if you have a squadron of say 15 fighters? It would be painful to have to select every one individually. Would there be some way to order them around as a squadron, perhaps in formation?
-Liked the fact that the command interface was minimal and unobtrusive.
-Loved the concept of "freedom to do what you want", so many developers don't seem to get that this is what we want. I hate it when a developer forces me to play a game their way. I'm glad you do seem to understand that freedom is critical.
-I thought that there was too much fog and dust in the area, it was a little hard to see what was going on, but that's really only my preference. I know you have stated that you love it! Will it be adjustable by the player?
-The dead capital ship made me wonder if it will be possible to salvage derelict ships for parts, or even dare-I-say board them to deal with whatever resistance remains? That would be totally awesome!

Thanks for taking the time to address my questions, I appreciate it and I'm sure that others are learning a great deal about both your ability and commitment to this project.
User avatar
Kayoz
Posts: 1516
Joined: Sun Dec 19, 2010 10:55 pm
Location: Timbuktu
Contact:

RE: Limit Theory

Post by Kayoz »

ORIGINAL: t001001001

I know nothing of programming games.

The value of your post was neatly summarized in that one sentence. Everything beyond that was completely a waste of keystrokes.
“That which can be asserted without evidence, can be dismissed without evidence.” ― Christopher Hitchens
undercovergeek
Posts: 1526
Joined: Tue Nov 21, 2006 7:01 pm
Location: UK

RE: Limit Theory

Post by undercovergeek »

id like to think there is some cultural clash or cultural difference here. Otherwise i can think of no other reason for you being such an unpleasant ****

We get it, you've made your point, get over it, move on, its over now
t001001001
Posts: 322
Joined: Thu Apr 30, 2009 7:06 pm

RE: Limit Theory

Post by t001001001 »

The value of your post was neatly summarized in that one sentence. Everything beyond that was completely a waste of keystrokes.

I wasn't assessing the programming or the game was I. My main point was that you come across as being a jerk. Obviously a concise and accurate observation on my part. I don't contribute often to this bbs, but when I do it's a bullseye [;)]

User avatar
Kayoz
Posts: 1516
Joined: Sun Dec 19, 2010 10:55 pm
Location: Timbuktu
Contact:

RE: Limit Theory

Post by Kayoz »

ORIGINAL: t001001001
The value of your post was neatly summarized in that one sentence. Everything beyond that was completely a waste of keystrokes.

I wasn't assessing the programming or the game was I. My main point was that you come across as being a jerk. Obviously a concise and accurate observation on my part. I don't contribute often to this bbs, but when I do it's a bullseye [;)]


Self delusion is a terrible thing.

Seems Josh has passed his 100k goal - which means he has to do Mac and Linux versions. Hrmm - this should be amusing to watch his development. Unless cross-platform dev kits have improved drastically since I last dabbled with them, his project's difficulty has increased quite a bit.

Perhaps someone who has some professional cross-platform development experience can chime in on how much more work it is to do Win, Linux and Mac concurrently?
“That which can be asserted without evidence, can be dismissed without evidence.” ― Christopher Hitchens
User avatar
Anthropoid
Posts: 3107
Joined: Tue Feb 22, 2005 1:01 am
Location: Secret Underground Lair

RE: Limit Theory

Post by Anthropoid »

@Josh: hey congrats on reaching your KS goal man! Now get to making that awesome looking game :)
ORIGINAL: Kayoz

ORIGINAL: t001001001

I know nothing of programming games.

The value of your post was neatly summarized in that one sentence. Everything beyond that was completely a waste of keystrokes.

And the value of yours could've been summarized had you not posted at all.

The x-ray is her siren song. My ship cannot resist her long. Nearer to my deadly goal. Until the black hole. Gains control...
http://www.youtube.com/watch?v=IkIIlkyZ ... playnext=3
Lucian
Posts: 279
Joined: Sat Dec 01, 2012 11:35 am

RE: Limit Theory

Post by Lucian »

id like to think there is some cultural clash or cultural difference here. Otherwise i can think of no other reason for you being such an unpleasant ****

We get it, you've made your point, get over it, move on, its over now

Well to be fair that 1010101010 guy did call him a jerk. Twice. What did you expect Kayoz to do, buy him flowers and congratulate him? I actually though his response was pretty restrained considering.
Seems Josh has passed his 100k goal - which means he has to do Mac and Linux versions. Hrmm - this should be amusing to watch his development. Unless cross-platform dev kits have improved drastically since I last dabbled with them, his project's difficulty has increased quite a bit.

I'm sure that Josh will correct me if I'm wrong but I think I remember him saying that the LT code was already very portable (sorry, cant remember where I heard that or I would post it). He's working in Visual Studio with all the power of the .net framework, so I can certainly believe it. I don't think he anticipates any serious problems with porting it over.

On the plus side it means that a whole bunch of Mac and Linux users might start chipping in for the next stretch goal which I believe is "Planetary ownership". I really want to own a planet, maybe two.
JoshParnell
Posts: 21
Joined: Fri Nov 30, 2012 5:31 pm

RE: Limit Theory

Post by JoshParnell »

ORIGINAL: Lucian
I'm sure that Josh will correct me if I'm wrong but I think I remember him saying that the LT code was already very portable (sorry, cant remember where I heard that or I would post it). He's working in Visual Studio with all the power of the .net framework, so I can certainly believe it. I don't think he anticipates any serious problems with porting it over.

On the plus side it means that a whole bunch of Mac and Linux users might start chipping in for the next stretch goal which I believe is "Planetary ownership". I really want to own a planet, maybe two.

Yes, the LT code is quite portable! It is not .net, though. It is C++ (portable) and OpenGL (portable) running on SFML (portable). So yes, I don't anticipate too much porting trouble! :)
User avatar
Kayoz
Posts: 1516
Joined: Sun Dec 19, 2010 10:55 pm
Location: Timbuktu
Contact:

RE: Limit Theory

Post by Kayoz »

ORIGINAL: JoshParnell
Yes, the LT code is quite portable! It is not .net, though. It is C++ (portable) and OpenGL (portable) running on SFML (portable). So yes, I don't anticipate too much porting trouble! :)

I had a chat with a friend of mine that does muck about with cross-platform projects. My position is now one of glee. Much like the sense of excitement one gets in watching a slow-motion video of a traffic accident. I await with bated breath, Josh's final release!

No problems with complexity.
No problems with project size.
No problems with multiple platforms.

It's all clear sailing for LT to hit the store shelves. I think any developer can tell you what sort of horror stories Josh's sort of statements has preceded.

Anyone want to place bets on how this is going to turn out?
“That which can be asserted without evidence, can be dismissed without evidence.” ― Christopher Hitchens
planner 3
Posts: 616
Joined: Fri Mar 07, 2008 1:30 am

RE: Limit Theory

Post by planner 3 »

Well I won't bet, but I'd like to see MATRIX dump this self promoting sales pitch into the abyss of oblivion.  Pfft ![>:]
"As Pogo said, 'We have met the enemy and he is us' "
User avatar
parusski
Posts: 4790
Joined: Mon May 08, 2000 8:00 am
Location: Jackson Tn
Contact:

RE: Limit Theory

Post by parusski »

Anyone want to place bets on how this is going to turn out?

WOW. I had no idea this was still going on. Plus, your "outragous" behavior shall no longer be tolerated!!![;)][:D]
"I hate newspapermen. They come into camp and pick up their camp rumors and print them as facts. I regard them as spies, which, in truth, they are. If I killed them all there would be news from Hell before breakfast."- W.T. Sherman
User avatar
warspite1
Posts: 41373
Joined: Sat Feb 02, 2008 1:06 pm
Location: England

RE: Limit Theory

Post by warspite1 »

ORIGINAL: parusski
Anyone want to place bets on how this is going to turn out?

WOW. I had no idea this was still going on. Plus, your "outragous" behavior shall no longer be tolerated!!![;)][:D]
warspite1

What IS going on? [&:]
As a wise man once asked:

War - What is it good for?
JoshParnell
Posts: 21
Joined: Fri Nov 30, 2012 5:31 pm

RE: Limit Theory

Post by JoshParnell »

ORIGINAL: Kayoz
I had a chat with a friend of mine that does muck about with cross-platform projects. My position is now one of glee. Much like the sense of excitement one gets in watching a slow-motion video of a traffic accident.

Haha fantastic! Maybe you'd be so kind as to share some of what you talked about? [8D] Perhaps touch on a few of those mucky details that your friend regularly deals with? I'm sure there must be many, many complexities that I've overlooked...?
Post Reply

Return to “General Discussion”