Return to “Technical”

Post

Deterministic vs non-deterministic dilemma

#1
If the game universe is procedurally generated and run forwards based on an initial seed, then it is entirely deterministic i.e. running the same initial universe twice will produce the same results at every stage.

However, the player is not deterministic (assuming Heisenberg got it right) and so player input will produce changes to the game universe that procedure will not.

If the player makes localised changes to the universe, that means that the local state cannot be based on procedure alone. Assuming the universe is dynamic and events trigger/influence other events, the butterfly effect applies. Major deviations from determinism should occur even further from the player's location. As the player moves through the galaxy, he changes everywhere he's been in some way. That in turn should have a bearing on what happens outside the bubble, otherwise major discontinuities will occur along the boundaries of the bubble's path. Thus it cannot be the case that state can be determined from determinisitc procedure even far away from the current bubble. So how can the state of far-off places be managed and determined at any one time? How can a player-influenced dynamic universe be run procedurally, particularly with regard to outside the bubble's path?

Or is it assumed that the changes made by the player should have no long-term or wide-area effects on the universe? i.e. there's no butterfly effect and the changes will cancel out over time, leaving the same results as pure determinism. That way if you move your location (and hence bubble of interest) to a far-off part of the galaxy, your starting location will end up as if you'd never been there. And so will everywhere else outside your current bubble. All player-caused deviations from determinism are localised and temporary. If so, doesn't that mean that the background events in any one hypothetical bubble should have no bearing on any other part of the universe? That means all consequences of procedure must be localised and temporary too. The universe is essentially static.

So, static or dynamic? :?
Post

Re: Deterministic vs non-deterministic dilemma

#2
I don't think it will matter in the end. There's no real way for the player to know what events he influenced. I'm assuming that even LT will use the RNG at some points, so even simulating the galaxy on two identical machines, without player interaction, would eventually be very different.

While I do think that the actions of a player can cause a ripple effect, I don't think that the effects of these actions would cause an infinite ripple.
Player helps faction A wage war with faction B. Faction B increases it's war efforts, thus needing more materials. Faction C sees an opportunity and increases their mining operations to sell materials to Faction B. Faction D's NPCs see trading opportunities and start ferrying the materials from Faction C to Faction B. Of course, faction C and D could in their turn use the extra money to invest in industry or war, or perhaps clear out some pirate sector, which would benefit all sectors nearby... But in the end, if the initial universe bubble is wide enough, effects can be marginalised when new sectors are generated.

Sometimes a fart is just a fart, and doesn't turn into a hurricane. :D
Beware of he who would deny you access to information, for in his heart he dreams himself your master.
Post

Re: Deterministic vs non-deterministic dilemma

#3
I assume that beyond the player "bubble", the universe effectively doesn't exist. Of course this isn't the most realistic model, but it's hardly noticeable once you get that "far out". As the player moves to different locations, the "bubble" expands and the areas that the player left are simulated at a much lower LOD. This is basically how minecraft works.

Of course, as you enter systems, some features (nebula color, position of planets) should remain the same between generation. Others (factions, ships) will of course vary.
Post

Re: Deterministic vs non-deterministic dilemma

#5
Katorone wrote:If that is true... Then what happens with your assets (factories, traders) when they're out of the bubble?
From what has been discussed so far, the clue is in the words:
jimhsu wrote:As the player moves to different locations, the "bubble" expands and the areas that the player left are simulated at a much lower LOD.
Obviously, with finite computer power, it's impossible to simulate an infinite universe. That's a given, and no amount of trickery is going to get around it. Thus, the simulation concentrates on the player's location. Most level of detail is given to the system he is currently in. Less level of detail is given to the adjacent systems. Lesser still for the "region" (for lack of fixed technical terms in LT) where the current system is located. Hardly any level of detail for the rest of the universe.

It's a necessity that the "bubble" moves along with the player, because his current location is always the one that needs the most detail. For instance, it's fair to bet that the movement of ships and actual battles will only be simulated for your current system. There's no need to do that for faraway systems where you can't observe anything anyway.

However, we also already know that your save game will be quite large and contain extensive records of everything you did. Thus, I gather that it won't be too difficult for the game to also continue to simulate your possessions in faraway worlds, at an appropriate level of detail. For instance: if you have a fleet in a faraway system, the game won't bother to actually make it fly around that system. It also won't bother to calculate the paths of every laser and every missile and the resulting damage/destruction in case of a battle. There's no need for that. But it can easily continue the simulation with a lower level of detail, for instance: at any step of the simulation there's a certain (low) (pseudo-)random chance that another, hostile faction arises or arrives. Should that happen, there's a certain (pseudo-)random chance that a battle occurs. In that battle you are losing a certain (pseudo-)random number of your ships, depending on the (pseudo-)randomly determined power of the hostile faction. Which ships are destroyed is also (pseudo-)randomly selected from the existing ones stored in your save game. Thus, if you ever return to the place, you will see the results of the low level simulation: another faction controlling part of the system, a reduced fleet and probably some destruction on those planets you own. Again, none of that needs to be simulated as long as you're far away. It suffices to use some (pseudo-)random to simulate the details once you arrive in the system. As soon as this has happened, those details are again stored in your save game and thus fixed forever.
Post

Re: Deterministic vs non-deterministic dilemma

#6
Oh, movement can (and still should) be simulated for out of system. It is just much more simplified (no collision detection, movement is a simple linear path from A to B, etc). The difficult part actually is handling combat in a "reasonable" way -- in X3, capships rule the out of sector battle, beating any other ship type at 100 to 1 odds ratios because combat is simply computed by tallying up total firepower for all mounted weapons. In system, it's a whole another story.

It's also hard to say at the end, but I think player assets should also project a smaller LOD bubble on their own, which would more accurately simulate conditions for that particular system alone. What I envision is a sort of hub and spoke model, where the hub (player) gets simulated at highest LOD, and spokes (connecting the player assets) also get some more LOD compared to the background. The system that the player is currently viewing (assuming some sort of remote system viewing tactical display is added) would also be simulated at higher LOD.

In the end, it comes down to sufficient fakery to make the universe seem realistic, while maintaining enough performance for the important stuff (dogfighting in the current system). Of course, this scales with performance, so you get a slightly more realistic simulation with a powerful computer.
Post

Re: Deterministic vs non-deterministic dilemma

#7
If you travel through a system and alter it in some way, ideally all future procedural determinism is based on its state when you leave, i.e. your changes echo forwards in time. That means its future states will NOT be the same as if you'd never been there. However, the feasibility of that would depend on how future states are generated procedurally (run forward), as each affected system would have to be noted or reset somehow. This part is a little hard to explain, so I'll use an analogy;

There's a bunch of balls at the top of an infinite hill, and at time=0 they're all set rolling downhill. Now if this is in a deterministic universe, their future paths can be exactly predicted i.e. positions and velocities calculated for any given time. Now, a non-deterministic 'player' intervenes at time=500, changing the course of one of the balls, and then departs. That ball's future path is still predictable, but only based on the change that was made i.e. no longer based on its hilltop start. So any calculation of its future state must take into account it's altered state at time=500 - effectively its 'replacement' start point.

So it is with changes made by the player in a deterministic universe. If you change a system in some way, all calculations of its state thereafter should be based on how you left it, not its state at the beginning of the game. Plus, what if your changes altered other systems as well, equivalent to the altered-path ball bumping into another and altering its path too? So it will depend on the level of detail over what distance. Now of course there can't be infinte processing in the game, so it's just a case of deciding the best compromise of accuracy vs. overhead.
Commander McLane wrote:if you have a fleet in a faraway system, the game won't bother to actually make it fly around that system. It also won't bother to calculate the paths of every laser and every missile and the resulting damage/destruction in case of a battle. There's no need for that. But it can easily continue the simulation with a lower level of detail
There was a discussion elsewhere about whether we could communicate instantly with all of our ships wherever they are, in the context of getting local trade prices and carrying out trading. If a ship is outside the BoI, that would necessarily mean that that system would have to be handled at a certain LoD - enough to do trading.

I suppose that could mean that opening communication with that ship "wakes up" that system to a medium LoD state, enough for certain current information to be obtained and instructions to be given. I'd be perfectly happy that remote instructions are limited i.e. there's no 3D information, just a symbolic representation of my ship, available stations, and actions my ship can be ordered to perform. Even if I don't communicate with it, there should be active local processing that includes my ship and its instructed actions as part of its processing. i.e. local trade prices may change in a way they wouldn't if my ship was not there, and that could also affect neighbouring systems.

I'm coming to the opinion that there should be three types of LoD;

High - where your piloted ownship is - full 3D of the local system. Active processing.

Medium - a bubble containing ownship's neighbouring systems out to a certain distance, AND the individual systems where each of your remote ships is located. Active processing.

Low - a further extension of ownship bubble, AND an extension bubble for each of your remote ships. MAYBE should include all systems you've ever visited. Normal procedural, but based on any changes made. On-demand processing e.g. only if an active event in a neighbouring system demands it.

Apart from that there are just background systems which are considered procedurally deterministic only i.e. their current states can be calculated (run forward) from their initial states, on-demand only.

That way each of your ships can still meaningfully interact with its locality to a reasonable level of detail. So there'd be one big bubble and various small ones. A refinement could be that if you have a large number of ships in a remote fleet, then the local bubble could be enlarged appropriately as it's assumed to have a wider effect on its locality.

However, I'm speaking from a position of ignorance where I don't know how the future states of remote generated systems are calculated e.g. if they affect each other (like a finite element simulation) or are handled in isloation.

Online Now

Users browsing this forum: No registered users and 9 guests

cron