Playing with universe gen
Moderator: Oberlus
Re: Playing with universe gen
Interesting, will encourage exploration of far corners of the Galaxy, and add some diversity to the game.
But it would depend a lot of galaxy parameters I guess ?
And I wouldn't want to have either no Acirema because the galaxy shape/density doesn't allow it, nor having a few Acirema or Furthest clear their surroundings of all other Natives in an important part of the Galaxy...
But it would depend a lot of galaxy parameters I guess ?
And I wouldn't want to have either no Acirema because the galaxy shape/density doesn't allow it, nor having a few Acirema or Furthest clear their surroundings of all other Natives in an important part of the Galaxy...
Re: Playing with universe gen
Well they'd be statistically less common in a crowded universe but still possible, as its stopping isolationists being placed near non-isolationist, but not preventing non-isolationists being placed near isolationist. The only things truly enforced would be distance from the player/AI empires and sharing the same system.LienRag wrote: ↑Thu Jun 01, 2023 11:38 am Interesting, will encourage exploration of far corners of the Galaxy, and add some diversity to the game.
But it would depend a lot of galaxy parameters I guess ?
And I wouldn't want to have either no Acirema because the galaxy shape/density doesn't allow it, nor having a few Acirema or Furthest clear their surroundings of all other Natives in an important part of the Galaxy...
Re: Playing with universe gen
As far as I can tell so far, the empires in 24th game (4 player, ring, team) were clumped together a little too closely again. I've had an idea in my head for a few weeks now, but I'm stumbling on the details. So the aim is to get a fairer distribution of neighbors and hopefully open up more galaxy shapes to MP. What I'm trying to minimize is difference in no. of neighbors:
neighbors(empire with most neighbors) - neighbors(empire with least neighbors).
The skeleton of the idea is instead of looking for x starting spots where x is number of empires, look for x + 1 starting spots which gives x + 1 layouts to compare. Still struggling on exact details and picturing what the actual effect would be.
neighbors(empire with most neighbors) - neighbors(empire with least neighbors).
The skeleton of the idea is instead of looking for x starting spots where x is number of empires, look for x + 1 starting spots which gives x + 1 layouts to compare. Still struggling on exact details and picturing what the actual effect would be.
Re: Playing with universe gen
Maybe something along the lines of farthest first traversal
Re: Playing with universe gen
Is there some "minimum distance from other capital" constant/variable? Perhaps easiest iterative implementation that spaces out all empires would be to increase that constraint, start with "pretty high" value and lower it until successful universe generation or hitting a value that says "nope"?
One question would be how high to start that would be higher than now but still within reason. Or maybe it could as well be unreasonable and do binary search to find maximum distance that works for given seed and is between "current minimum" and the "unreasonable" value
One question would be how high to start that would be higher than now but still within reason. Or maybe it could as well be unreasonable and do binary search to find maximum distance that works for given seed and is between "current minimum" and the "unreasonable" value
Re: Playing with universe gen
I like a twist of wobbly's N+1 idea: delimit at start something like 5*#empires blobs of #systems/(6*#empires) systems. Some would be crappy, unable to grow to the average blob size. Then collect a set of "best blobs" that are not adjacent to any previously selected best blob, and assign empires to each blob. Since all empire blobs are surrounded by unassigned blobs, all of them are granted to be relatively far from other empires. There would be a certain number of blobs to create that enhances this process and ensures relatively uniform maximum minimum distance between capitals, that would depend on galaxy shape. But there should be less finetuned numbers that allow for a good trade-off between uniformity and variability/surprise.
Re: Playing with universe gen
Sounds like how its done now? With the distance to try for set here:BlueAward wrote: ↑Fri Jun 09, 2023 11:51 am Is there some "minimum distance from other capital" constant/variable? Perhaps easiest iterative implementation that spaces out all empires would be to increase that constraint, start with "pretty high" value and lower it until successful universe generation or hitting a value that says "nope"?
One question would be how high to start that would be higher than now but still within reason. Or maybe it could as well be unreasonable and do binary search to find maximum distance that works for given seed and is between "current minimum" and the "unreasonable" value
https://github.com/freeorion/freeorion/ ... py#L46-L50
So it tries to find good spots all at least 10 distance apart and if it fails it'll try for 9 then 8, then 7,
Trouble is it doesn't solve the problem of some players getting more neighbours. If you have a 3 arm spiral and place 1 player at the centre and the other 3 at the edges they are all the maximum distance from nearest neighbour, but the empire at the centre clearly has 3x as many neighbours.
Re: Playing with universe gen
Okay then I guess what I was saying was that 10 is too little in practice for recent sizes of galaxy and may lead to clumping of empires and some empty areas, and it would be good to spread out starting locations further apart for example by making it higher than 10 as easiest way to go about it.
Even what Oberlus is saying is about somehow spreading empires apart rather than directly ensuring number of neighbors
Neighbors is not so easy to define I would think, even in MP23 I would not say you had 3 neighbors only two (o01eg and me)... I can probably find a system equally spaced from capitals of Endhu Oberlus and me and if I went there first would it mean I had three neighbors?
I may have to look at current code to speak more on point, perhaps depending on expectations some general topology should be constructed ground up from starting locations rather than trying to find good locations in a totally random galaxy, and the rest filled in with some general constraints
Even what Oberlus is saying is about somehow spreading empires apart rather than directly ensuring number of neighbors
Neighbors is not so easy to define I would think, even in MP23 I would not say you had 3 neighbors only two (o01eg and me)... I can probably find a system equally spaced from capitals of Endhu Oberlus and me and if I went there first would it mean I had three neighbors?
I may have to look at current code to speak more on point, perhaps depending on expectations some general topology should be constructed ground up from starting locations rather than trying to find good locations in a totally random galaxy, and the rest filled in with some general constraints
Re: Playing with universe gen
That's easy enough to test, that value I linked to is in the scripting, its changeable without a compile, and the actual min. distance (e.g. if it fails to find spots at max. distance) is in the log files. But like I said before, pushing empires apart only works on a ring, any shape with a central area is a different matter.BlueAward wrote: ↑Fri Jun 09, 2023 2:40 pm Okay then I guess what I was saying was that 10 is too little in practice for recent sizes of galaxy and may lead to clumping of empires and some empty areas, and it would be good to spread out starting locations further apart for example by making it higher than 10 as easiest way to go about it.
Now the crudest method for dealing with the center is to just rip it out of contention. I was thinking of something similar with a little more finesse. Hence the idea of finding extra spots. That way there are "spare spots" that can be removed. Maybe the algorithm removes the centre spots, or maybe it places less in the centre. It just works out which set of size x (no. of empires) is least difference in no. of empires from a set of size (x + y) (no.of empires + no. of spares).
Now to some degree, shapes with a central area are never going to be truly fair (short of 3 empire in a 3-arm galaxy with no central spots), but I'm not aiming for perfection. Just a way to nudge it towards a better balance.
Re: Playing with universe gen
I was too vague. "Best" blob would be measured however we want. Consider number of habitable planets, size of those planets, spread of those planets among systems (because it's better one system with 4 planets and a GG than 5 systems with one planet each), spread of environments, compatibility of the environments in the blob with the empire species... And number of blobs neighboring this one to be closer to the average of number of neighboring blobs across all blobs (so blobs at dead ends, with one single neighbor, and blobs in the center, with 4+ neighbors would be worse than blobs with 2-3 neighboring blobs).
Also consider that spiral galaxies have higher density of planets in the center, so empires starting in the center have more neighbors but also more expansion choices. I mean, there are galaxy shapes that are expected to introduce inequalities between empires, but you can just chose a different shape with the characteristics you wish for.
Re: Playing with universe gen
OK so I imagined if we're saying there are N systems per player, then it's like an area around the player we would like to give it to them, so the distance we'd expect between players would be like radius of the area. So I'd say that value should start at about 2*sqrt(N). Like if there are 52 systems per player, maybe the HS_MAX_JUMP_DISTANCE_LIMIT should be about 14 or maybe 15. I tried some ring galaxy seeds with 208 systems and 4 players and eyeballing the homeworld locations what can I say, I like more the ones starting with 14 indeed. With this default 10 stuff I'd see those empty areas without players that Daybreak complained about some time ago too, or maybe the "clumping" you have complained, and with 14 I wouldn't see it, so the single goal I wanted to check about higher spacing was met. That's of course anecdotal, only considering ring galaxies, and only concerning with spacing things out. But from the limited testing I've done I liked it for those parameters. May at least be worth considering for topologies (which is different to "shape"!) that should be considered "fair" like ringwobbly wrote: ↑Fri Jun 09, 2023 3:31 pmThat's easy enough to test, that value I linked to is in the scripting, its changeable without a compile, and the actual min. distance (e.g. if it fails to find spots at max. distance) is in the log files. But like I said before, pushing empires apart only works on a ring, any shape with a central area is a different matter.BlueAward wrote: ↑Fri Jun 09, 2023 2:40 pm Okay then I guess what I was saying was that 10 is too little in practice for recent sizes of galaxy and may lead to clumping of empires and some empty areas, and it would be good to spread out starting locations further apart for example by making it higher than 10 as easiest way to go about it.
Re: Playing with universe gen
yeah the thing I was talking about seems to work well for box galaxy too for example... as long as there are like 4 empires; if you put in 5th, then somebody ends up somewhere in the middle and salty :O (but not like it's unexpected)
Re: Playing with universe gen
Maybe next multiplayer o01eg can set this to 15 server-side? Not sure whether that will cause checksum errors.BlueAward wrote: ↑Fri Jun 09, 2023 8:52 pm OK so I imagined if we're saying there are N systems per player, then it's like an area around the player we would like to give it to them, so the distance we'd expect between players would be like radius of the area. So I'd say that value should start at about 2*sqrt(N). Like if there are 52 systems per player, maybe the HS_MAX_JUMP_DISTANCE_LIMIT should be about 14 or maybe 15. I tried some ring galaxy seeds with 208 systems and 4 players and eyeballing the homeworld locations what can I say, I like more the ones starting with 14 indeed. With this default 10 stuff I'd see those empty areas without players that Daybreak complained about some time ago too, or maybe the "clumping" you have complained, and with 14 I wouldn't see it, so the single goal I wanted to check about higher spacing was met. That's of course anecdotal, only considering ring galaxies, and only concerning with spacing things out. But from the limited testing I've done I liked it for those parameters. May at least be worth considering for topologies (which is different to "shape"!) that should be considered "fair" like ring
Re: Playing with universe gen
As an aside, those numbers in options.py could be moved to the in-game menu, you'd just have to work out where. Should they be moved in-game?