Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve equilibrium of colonisation opportunities nearby HWs in universe generation #2900

Open
Oberlus opened this issue Apr 27, 2020 · 5 comments · May be fixed by #2915
Open

Improve equilibrium of colonisation opportunities nearby HWs in universe generation #2900

Oberlus opened this issue Apr 27, 2020 · 5 comments · May be fixed by #2915
Labels
category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator.

Comments

@Oberlus
Copy link
Contributor

Oberlus commented Apr 27, 2020

Environment

  • FreeOrion Version: v0.4.8, v0.4.9+

Description

Universe generation is too random regarding starting positions and the opportunities of colonisation for the different empires.

Monsters, natives, paths/chokepoints, specials or any other factor that can affect game balance is out of the scope of this feature request. All those could be addressed in different ways but there is always the chance to disable monsters, natives or specials and to use galaxy shapes and starlane densities that minimize the chances of unfair starting positions.

This is only about colonization opportunities.

The following is a counting of available planets around each empire's HW from ninth multiplayer game in @o01eg's server, for the player with less available good&adeq. planets and the player with more. For each player and planet tolerance, the figures correspond to number of planets at 0, 1, 2, 3, 4, 5 and 6 jumps away from HW, not including HW itself.

  • Lucky (swaq)
Good: 2 / 0 / 3 / 2 / 0 / 1 / 0
Adeq: 0 / 0 / 2 / 1 / 3 / 3 / 4
Poor: 0 / 0 / 1 / 2 / 1 / 3 / 1
Host: 0 / 0 / 5 / 0 / 2 / 2 / 5
Belt: 1 / 1 / 4 / 3 / 1 / 3 / 7
GG:   1 / 0 / 5 / 1 / 0 / 4 / 7
  • Unlucky (Oberlus)
Good: 0 / 0 / 0 / 1 / 0 / 0 / 2
Adeq: 0 / 0 / 0 / 0 / 2 / 1 / 3
Poor: 0 / 0 / 0 / 2 / 1 / 0 / 1
Host: 2 / 0 / 0 / 0 / 0 / 1 / 9
Belt: 2 / 0 / 0 / 0 / 3 / 0 / 3
GG:   1 / 0 / 0 / 0 / 0 / 0 / 0

There are other players rather lucky (danyspin96) or unlucky (Magnate) in the same game, but these two are examples good enough to illustrate how different and unbalanced can be the starting conditions for two players. One on one, an unlucky empire have no chance at all of winning the game against a lucky empire, even if the lucky empires make wrong choices and the unlucky ones do a perfect game.

Once the players begin to realize their situation, it is rather discouraging to know that s/he cannot win (or lose, to a lesser extend).

Feature request

Improve the universe generation algorithm to disallow too unbalanced colonisation opportunities.

Currently the algorithm ensures that every empire has a minimum of 8 systems (empty or not) in the in the vicinity (3 jumps from HW), a minimum number of planets (regardless of environment!) in that vicinity equal to the minimum between 10 and the number of systems in its vicinity. That seems flawed, looking at the results, on one hand because it does not consider environments, and second because a HW starting in an area with many starlanes will have more available planets (ensured by the algorithm) than a HW starting in a more densely connected area (in the example above, lucky empire had 14 systems in the vicinity, unlucky had 8).

The conditions should not only check for minimums but also ensure that luckiest empire does not have much better colonizable opportunities than the unluckiest empire.

@Voker57
Copy link
Contributor

Voker57 commented Apr 27, 2020

Alternative suggestion: make exobots live anywhere but nerf a bit. Voker57@eee198e

That makes such starts ok if player rushes the 'bots. Maybe also make their research easier.

Oh, and also disable natives until they are overhauled, because they are another very wild card in worldgen :-)

Changing worldgen to attempt to equalize starting conditions seems like a flimsy solution to me, hard to implement properly and to maintain. Implementing alternative ways to make use of what you got is better.

@TheSilentOne1
Copy link
Member

Somewhat OT, exobots would be a prime candidate for TAR: cheap base tech with costly refinements that keep them competitive in late game.

@geoffthemedio geoffthemedio added category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator. labels Apr 27, 2020
@geoffthemedio geoffthemedio changed the title [FEATURE] Improve equilibrium of colonisation opportunities nearby HWs in universe generation Improve equilibrium of colonisation opportunities nearby HWs in universe generation Apr 28, 2020
@Oberlus Oberlus linked a pull request Apr 30, 2020 that will close this issue
@Vezzra
Copy link
Member

Vezzra commented May 1, 2020

Originally this problem has been far worse: homeworld placement was completely random. How far away other starting positions were, how many and what system/planets were around your starting position were etc., none of these had been taken into account.

Which of course led to a lot of complaints. The first measure taken was to ensure a more even distribution of the starting positions, ensuring a certain min distance between them. That algorithm has been tweaked and refined subsequently.

The next step had been implementing an algorithm that made sure you had at least a certain minimum of systems and planets within a defined vicinity of your starting position, to prevent starts where you had only your starting planet and nothing else within several jumps.

Of course all that, while alleviating the issue, hasn't been enough, there is still much room for improvement. One thing we haven't tackled so far (AFAICT) is the problem that you can end up boxed in by space monsters (when they are enabled), which is particularly likely if your starting position is in an area with only one or a very few lanes connecting you to the rest of the map.

Another is, as @Oberlus pointed out, that the type of planets in the vicinity of your starting position is not taken into consideration.

All that said I still think what @Voker57 said is the best approach:

Changing worldgen to attempt to equalize starting conditions seems like a flimsy solution to me, hard to implement properly and to maintain. Implementing alternative ways to make use of what you got is better.

I wholeheartedly agree with this.

@Oberlus
Copy link
Contributor Author

Oberlus commented May 1, 2020

All that said I still think what @Voker57 said is the best approach:

Changing worldgen to attempt to equalize starting conditions seems like a flimsy solution to me, hard to implement properly and to maintain. Implementing alternative ways to make use of what you got is better.

I wholeheartedly agree with this.

I agree too.
PR #2915 attempts to ensure that the number of available planets around home systems is more balanced than currently, without trying to change environments. The problem with current implementation is that one empire can have several times more nearby planets than another, and that is what that PR tries to fix.
PR #2916, reusing @Voker57's commits, tries to solve the environments' issue as per his suggestion.
It is the combination of both PR what can ensure more balanced chances of victory.

@Vezzra
Copy link
Member

Vezzra commented May 1, 2020

To expand on what I said above: the measures put into place until now have been more geared toward preventing a impossible start (which had been an issue before, you could end up in practically hopeless starting positions, e.g. a system with only your homeworld, and only one starlane leading to another system, which unfortunatly is guarded by a Sentinel, so impossible to get by with anything early game).

They weren't geared toward actually providing more or less equally good starting positions, which is what you're trying to provide now.

without trying to change environments

The fundamental problem here is (as I already stated in my other comment) that at that point in the homeworld selection process the species of the empire which will get the starting position assigned isn't known, because the assignment to empires happens at a subsequent step.

Without knowing which empire will receive which starting position, you can't take starting species into consideration. Hence, a major rewrite of the process will be unavoidable once you want to ensure proper planet types near empire homeworlds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:tweak The PR contains insignificant code changes, like code style grooming or value tweaking. component:content scripting The Issue/PR deals with the FOCS language, turn events or the universe generator.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants