Return to “Suggestions”

Post

Ideas on Simulating the Universe

#1
Ringu wrote:Similarly, as you say if different systems or regions have different scales for the clock rate, that would be a relatively easy way to create variations in development/evolution naturally - some systems may be in the stone age while others discover warp drive.
Do be aware of the technical limitations of the request.

Either the simulation is limited to single star systems, or you have to simulate the entire galaxy at once. If limited to single star systems you get odd results, like a stone age system next to an advanced one. If you simulate the entire galaxy then it's difficult to get different regions to be different ages (as well as being hellishly slow to simulate.

Instead, a more efficient and effective method is that used in Minecraft. You create a multidimensional 'field'. In Minecraft, it's like the terrain height. Minecraft uses a pre-computed function with a seed value (http://bukkit.org/threads/how-does-mc-g ... ks.134901/) and if you give it a location, that function will return a height. The height varies smoothly, but you can jump to any location and calculate the height... you don't need to calculate the neighbors first.

LT can use a noise function to generate system values like population... tech level... aggressiveness... mineral availability. When you get near a system it gets generated... until you do, it doesn't even have to exist at all. While in a system, nearby systems (within two or three hops) would be simulated at a high level, so that they 'grow' naturally.

The result of this is that you have large mountains (big, high tech civilizations), low mesas (large low-tech civilizations), small hills (tiny low-tech civilizations), and tall narrow spikes of rock (small high tech civs). Multiple overlapping functions provides the different civilizations with different features (minecraft biomes).

The end result is that pre-computing a field function reduces the need to 'simulate' time, and ensures continuous variation without weird cliffs (stone age next to diamond age). It usually provides better results with less CPU than simulation.
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#2
except that just reducing it to field functions only doesnt give nearly as many "logical" structures as simulation would give.

it works fine for static things like terrain, or for games where everything is static, but in a chaotic system like LT... i dont think that static "predefined" functions would do much good beyond the initial seed before the simulation
seed -> simulate for x time -> show the player.
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#3
Cornflakes_91 wrote:except that just reducing it to field functions only doesnt give nearly as many "logical" structures as simulation would give.

it works fine for static things like terrain, or for games where everything is static, but in a chaotic system like LT... i dont think that static "predefined" functions would do much good beyond the initial seed before the simulation
seed -> simulate for x time -> show the player.
Field functions are the 'seed' value. When you get nearby, the system gets 'loaded' into memory and starts living and breathing, simulating transactions and such. This is similar to Minecraft and the flora and fauna that are generated, but then start growing as you get close.

There is a reason that Minecraft doesn't simulate the entire world... because it's computationally intractable. It's easy to say 'just simulate the world so that it makes natural structures', but those are just words. Doing it in practice is rarely possible for any system but the most basic, and LT is hardly a simple system. This is why pre-generation makes sense... it provides natural variation in macro structure without the massive CPU investment needed to actually simulate that growth.
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#4
Where do you get "simulate all the things, all the time" from? :eh:

Beyond some treshhold distance, systems are in storage/not generated.

Once the system gets in range, generate it from the basic field function, and (speed) simulate it until it has catched up with global time in very abstracted form.
That gives you general faction interaction, general trade layout, etc.
The rough outlines of the world.

As the player gets closer, simulate with higher fidelity and fill in details from the higher level sim.
Iterate until the player arrives at the system.

No need to simulate all the world at once, have a gradient of fidelity to nothingness
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#5
Cornflakes_91 wrote:Where do you get "simulate all the things, all the time" from? :eh:

Beyond some treshhold distance, systems are in storage/not generated.

Once the system gets in range, generate it from the basic field function, and (speed) simulate it until it has catched up with global time in very abstracted form.
You are speaking from the assumption that the basic field function will be used to generate the universe. Unless I missed something, my post was the first to mention this implementation aspect. If you don't assume that a field function is used to generate regional variation then the suggestions for using simulation to create that variation take on a very different tone, and the implication becomes that you get a big advanced civ by simulating a lot of time. That was certainly the impression I got.

Even if you do start with a baseline created from a field function like Minecraft terrain, I'm not sure 'speed simulation' is ever a good idea for making a sensible universe. This is due to the simulation edge effect.

Let's imagine a simple simulation outcome. There would be many things simulated; I'm just going to focus on one: blueprint trading. Let's imagine that a fantastically great mining blueprint is created by the player. This blueprint is just the best, and everyone wants one. The player produces them and sells them at a reasonable price, making them very popular with the AI.

Now, for obvious reasons we want the simulation to at least attempt to have the AI make reasonably intelligent decisions. If a superior mining ship is available, the AI will want to acquire those ships. So the ship will spread from system as the AI chooses to acquire it and use it in its operations. They will reverse engineer it to make it themselves, and do all the relevant and sensible things you would expect when a superior technology is made available. Thus that ship will slowly diffuse out, spreading to neighboring systems, replacing the other models of mining ship.

But what do you do when the player travels to a neighboring system? All of a sudden, three hops away, four new systems that were previously not simulated come 'in range'. Your suggestion to 'speed up the simulation' and age them rapidly means you will either be simulating them alone without simulating trade (and causing them to 'grow up' substantially different from their neighbors), or you will be simulating them with trade and they will instantly get hours or years worth of trade with their neighbors... including the new ship design.

Imagine traveling around the world after making that miner design. Every time a new set of systems come into range, they 'age' and spend virtual years importing neighboring technology. Your great design instantly spreads, and no matter how far or how fast you travel all the best ship designs are available because the AI imports them as soon as it's simulated.

On the other hand, if you age systems without considering neighbor effects, then each system will grow up very differently. The universe will be 'noisy' with massive variations from system to system and very little cohesion between neighboring systems. Smooth gradations between sparse outer worlds and packed inner worlds will get obliterated by the noisy variations of accelerated simulation.

This can actually be witnessed right now in Minecraft. There is a mod, 'natural forests' or something like that where trees grow, get old, die, and new trees grow from the seeds. If you stand in one spot for several hours allowing the mod to simulate forest growth, then you travel to the edge of the loaded chunks you will see an unnatural 'wall' of forest that ends at the edge of the simulation. Now imagine that we adjusted Minecraft so that newly loaded chunks 'simulate' a day when they are first loaded. What would happen is that you could never find empty plains! The neighboring 'old growth' forest would spread and 'grow' in the newly spawned chunk. Even empty chunks would fill with trees as they were rapidly aged. As you traveled, loading new chunks that got instantly 'aged' the forest would grow with you. You would 'paint' the Minecraft world with trees due to the artificial aging.

The end result would not be more variety, but less.

I do agree that simulation fidelity should be increased in the player's proximity and reduced at range. I just disagree with 'aging' newly loaded systems because I think that will create less interesting variation and cause more odd discontinuities in the universe.
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#7
MyrddinE wrote:
MyrddinE wrote:Your suggestion to 'speed up the simulation'
I apologize, but this was not your (Cornflakes) suggestion but Ringu's.

Eh, it was joshs idea and i mentioned it in this thread :P



And how does your solution alleviate the simulation edge effect?

Your system is 1:1 the same from minecraft, "yeah, um, here was the edge of the simulation, so there is a massive discontinuity".

Completely ignoring the simulation aspect of the game.

If there is a good tech, why shouldnt it spread?
Or if theres a small, lowtech "prey" civilisation at the edge of a simulation expanded aggressive that should have been subsumed by the aggressive faction long ago?
Or the inverse, big, relatively peaceful civ at the edge of your simulation, and the aggressive civ spawns in?

With gradual simulation "fade in" theres at least some "sanity check" in the world before the player sees it.

Instead of just bruteforce painting the world with whatever comes up, regardless of what the chaotic system on top of that would have changed.

Also, the coarse sim is there that you can include more systems in it, not just single systems individually.
You approximate them in the sim with simple field functions and let them interact with their surroundings.
Simulation edges could be approximated by taking the derivative of the world gen function to get an approximation of the world beyond the border.
"Beyond this system there are more/less resources, more/less civs" etc.

(And your tree example looks to me like the mod completely ignoring why biomes look the way they look in the first place. If their trees cover a plains biome where usually no trees grow, the mod's simulation is broken, not the concept of speed simulation.
If you generate biomes without encoding why a biome looks like it looks, you dont have enough data for the sim to work properly.
Savannahs are not "not forest" because trees didnt arrive there yet, but because trees dont grow there due to environment conditions.
if you have no environment conditions to define biomes, everything is a single biome and will develop as such)
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#8
MyrddinE wrote:Even if you do start with a baseline created from a field function like Minecraft terrain, I'm not sure 'speed simulation' is ever a good idea for making a sensible universe. This is due to the simulation edge effect.
I don't think that's right for a couple of reasons; a) the simulation must have a natural edge where the effects die off ('If there's a bright centre to the galaxy, this is the planet that's furthest from it') and it's reasonable to assume the edge will be between two systems, and 2) if the simulation determines a different evolutionary/developmental speed per system effects would naturally be very different and noisy anyway.

The description you gave seems to me to be flawed by being broken as Cornflakes says, incomplete (doesn't take into account whether a given culture has interstellar travel, for instance) and by ignoring that this simulation *happens anyway once you get close enough*. (Hence Cornflakes' LoD reference). If this is how systems/regions are simulated anyway, then why not just run the sim (at a slightly less detailed level possibly, but not definitely) in headless/accelerated mode in the first place? That way, you get results that are far more consistent with the possibilities that occur if you visit the system as well.
--
Mind The Gap
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#9
The "simulation edge effect" is a nice name for what is definitely an issue. I've mentioned it before in a variety of threads and I've repeatedly seen Cornflakes state - as fact - that systems out of range of the player will be saved to disk. Insofar as I'm aware, this has not been confirmed, and right now how the universe will be simulated is unknown to anyone but Josh.

My contention has always been that systems that are far away from the player will not be static, but will in fact tick over at a very low rate... or perhaps some clever tech will allow the system to imitate a full simulation at the loss of some fidelity that the player won't notice.

The reason I believe this is because otherwise strange discontinuities are likely at the edge. This is basically what MyrddinE is getting at. The best way to think of this is to take a three system example, connected A - B - C. Imagine the player is in A, and the universe will simulate only one system out from the player. If the player stays in A for a long period then without a background simulation of some variety no NPC will ever travel from A, or B, to C - or back again. Thus when the player does move to B, the game will have to invent the history of C without reference to what has been happening in A or B. Discontinuity.

Some of this is wrapped up in how the universe is created at the start of the game. My assumption is that there will be a set number of initial systems and these will all be simulated. As the player reaches the edge, more systems are simulated. If the player goes far enough out from the initial area, then the "accelerated simulation" option becomes real... because it's reasonable to believe that the new systems have not interacted with the initial area.
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#10
The real question is 'if the system is not simulated, will the player notice? Or care?'

The player will notice macro scale effects like area claimed by factions, and different architectural styles. They will also notice simulation glitches like 'my empire is only profitable when I'm in the same system, because the low quality simulation when I'm far away doesn't approximate well'.

But is the player going to notice that a system was freshly created via a field function, or has been simulated for weeks of in-game time? If the field functions are designed well, they should not. So it seems that working to invest in good procedural generation of new systems is both more effective and less computationally intensive than trying to simulate systems.

I also contend that AI simulation is far more computationally expensive than most users here realize. In addition, several comments have implied that the longer the game goes on, the more time new systems should be simulated to 'age' them appropriately. This is not a scaleable option if you want to have open ended games where you can spend hundreds or thousands of hours playing in a procedurally generated infinite universe.
Post

Re: Ideas on Simulating the Universe

#12
Talvieno wrote:Splitting this discussion to its own thread to keep things neat. :)
Could I ask where this discussion began?
<Detritus> I went up to my mom and said "hey... do you feel like giving five dollars to black lives matter?" and she laughed and said no :v <Black--Snow> my life does matter though ~~ added by Hema on Jun 11 2020 (2770)
Post

Re: Wing Commander, "Ace" Pilots, and Limit Theory

#13
mcsven wrote: or perhaps some clever tech will allow the system to imitate a full simulation at the loss of some fidelity that the player won't notice.
which is the LoD + speed sim if the system comes back from disk method.
you simulate the things exactly as far as you need for the sim to be accurate enough, which is with ever lower fidelity until you can suspend them to disk without loss of sim accuracy.
mcsven wrote: The reason I believe this is because otherwise strange discontinuities are likely at the edge. This is basically what MyrddinE is getting at. The best way to think of this is to take a three system example, connected A - B - C. Imagine the player is in A, and the universe will simulate only one system out from the player. If the player stays in A for a long period then without a background simulation of some variety no NPC will ever travel from A, or B, to C - or back again. Thus when the player does move to B, the game will have to invent the history of C without reference to what has been happening in A or B. Discontinuity.
only if you treat the systems A,B as the only things that could ever exist while simulating them.
but if you act smart and arent surprised by "oh, theres a system C over there"


A and B are generated from the field function system that generates everything and simulated explicitly
beyond system B you take the first and second order derivatives of the field functions that generate the universe (ore densities and types, spawned civilisations, etc) and approximate the influence those non generated areas have by some bilance system at the border.
as the player cant see that border, it doesnt matter that its far from being precise, it gets reconstructed and simulated from the bilance system and the more explicit sim systems.


you could layer that even more by using different resolutions for the field function approximations, very close to the player the "approximation" is the full sim, and the further you go away from the player, the lower the fidelity will be.
you group ever more elements to a single "blob of force" that acts as a field on the universe made of fields
very close you have the sim elements be single systems, further away its a group of systems, even further a group of groups, and beyond even that its "the rest of the universe" appoximated very simple.
calculus \o/
MyrddinE wrote:But is the player going to notice that a system was freshly created via a field function, or has been simulated for weeks of in-game time? If the field functions are designed well, they should not. So it seems that working to invest in good procedural generation of new systems is both more effective and less computationally intensive than trying to simulate systems.
and infinitely more development intensive than trying to emulate the sim that already has to work with a completely different set of systems.
how do you address modded universes?

how would you include conten/mechanics patches? you'd have to do the same job at leas twice, once for the general game+sim, once for the fake sim.

how do you include dynamism in your system? your proposition sounds to me like either completely simulating things, or not at all.
that would create a moving, hard simulation edge, and not a smooth one as with LoD + sim.

MyrddinE wrote: I also contend that AI simulation is far more computationally expensive than most users here realize. In addition, several comments have implied that the longer the game goes on, the more time new systems should be simulated to 'age' them appropriately. This is not a scaleable option if you want to have open ended games where you can spend hundreds or thousands of hours playing in a procedurally generated infinite universe.
eh, no, you always simulate the same number of systems (same area on the galactic map), if they get out of range, suspend to disk, if they come back, speed sim them strongly abstracted to get them back to "now"
Black--Snow wrote:
Talvieno wrote:Splitting this discussion to its own thread to keep things neat. :)
Could I ask where this discussion began?
http://forums.ltheory.com/viewtopic.php ... 15#p114089
Post

Re: Ideas on Simulating the Universe

#14
Great discussion. Keep it going.

One note: AI was designed very carefully to be efficiently coarsely simulated (remember 'projects'? ;) ). At large distances from the player, systems become, essentially, an abstract econo-political simulation (did that make any sense?)

Anddd one more note for you guys to chew on: it is highly probable that monte carlo techniques will be included in the final sim. For example, instead of thinking of far-away systems as having some 'simulation granularity' parameter that is static, consider instead if they have a simulation granularity that is a probability distribution -- i.e., most of the time far-off systems will be simulated coarsely, but occasionally will get lucky and receive some real, fine-grain simulation time. Doing so significantly 'smooths' edges between systems with different LODs (i.e., different topological distance from player's assets). (Yes, if you picked up on that, you now realize that system that contain player assets are handled a bit differently, and generally given more attention).

All of this is an exceptionally hard problem from an algorithms standpoint. Just the kind of thing we like to discuss around here, am I right? :D
“Whether you think you can, or you think you can't--you're right.” ~ Henry Ford

Online Now

Users browsing this forum: No registered users and 16 guests

cron