Return to “Dev Logs”

Post

Re: [Josh] Monday, May 21, 2018

#76
Josh said he would post about it here, but it seems he forgot, and only posted it on the Kickstarter.
Kickstarter Josh wrote:Before we get to the excitement, though, I would like to announce an unfortunate bit of news: Lindsey has left the team. Rest assured that there are no hard feelings nor burnt bridges; she left of her own volition due to changes in her work availability. During her time here, Lindsey built up an impressive procedural geometry library that I'll be able to leverage in finishing up the remaining algorithms. And, of course, we still have the ridiculously-good fighter algorithms that she devised! Despite her time with us being too short, I am nevertheless grateful for all that she accomplished while here. Thanks, Lindsey! o7
Have a question? Send me a PM! || I have a Patreon page up for REKT now! || People talking in IRC over the past two hours: Image
Image
Image
Post

Re: [Josh] Monday, May 21, 2018

#77
In regards to NPCs obeying orders or not, I'm thinking that we could rip a page out of Rome: Total War's playbook. If you played it, you might remember that your different units had levels of Morale and Discipline, where Discipline was how rigid their formation would be, and Morale their willingness to continue following an order vs routing.

If instead of determining unit formation, Discipline could be the likelihood that they would follow an order on a scale of "how high" to "why", then you just have to ensure that your units have sufficient discipline. This would be a sliding scale with different thresholds ranging from "frak you, you're crazy, that's suicide" to "yeah, whatever"to "fine, but if it gets bad, i'm getting out of there" to "my life is yours, your will is my law". And I don't think we would have to worry too much about there being a lack of disciplined NPCs, as the other NPCs probably don't want to hire someone who won't follow orders, NPCs with lax discipline are simply less valuable and less useful. But that's not to say we couldn't train them to increase their discipline (yup, gonna keep pushing that idea :lol: )

In regards to PCG, determinism, and random events:
The seed should only ensure an identical universe only up until the point in which the player enters. After which, only the universe's structure and material composition should remain identical, and cultures should have large, somewhat vague heatmaps which control the more basal PCG, while the specifics are generated on the fly as you approach... yes, this means even with the same seed, universes will diverge somewhat as you get further from the origin system, though it will still be broadly similar.

For random events, we could just say that there is a variable %chance of an event occurring if a valid trigger is in range, whether said trigger is in range is largely but not wholly dependent on the seed, but even the same seed will have different random events at different times...that's why they're called "random" events :ghost:

For history generation and LOD simulation after the player enters, we had a discussion on What is generated at "the edge" and we came to the rough conclusion that there should be concentric circles/spheres of different LOD around the player. Quoting my own post
The only thing that matters in regards to “The Edge” is the same single thing that matters to everything else: Maintaining the suspension of disbelief for the player without breaking the computational bank...
...30-35 Jumps from Player: These systems “exist” in zones/clusters structured like the outermost lane-slices of Warp Lanes. They don’t have discrete systems, but they do have basic, static PCG traits like # of stars, Zone makeup (avg number of planets, avg size of stars, avg material per system, etc) & Gross Resource Value of the whole zone. The game knows these zones exist, but the player doesn’t.
...25-30: zones stay as they are until the player is 25 jumps from them...These use the details from their previous state to create the systems, split the Gross Zone Resource Value into Gross System Resource Values, convert zone makeup to system makeup, and link the stars to each other
...20-25: zones become more detailed as a group when the player is 20 systems out, and go back when they are again 25 out. Here is where LT gains its Broad Strokes Cultural Diversity, Historical generation, and stops being static. Here, the Zone as a whole gets a Population Density, Culture Vector, Hegemony Value (Is it a huge empire, small-medium kingdoms, many isolated islands), Military Value, Tech Value, and Production Value (How much stuff is made here). Historical generation begins here and is calculated once every 5 minutes, but can represent 50 years of Zone History
...10-20: zones take the Information from the above, and split it into a number of polities based on the Population Density and Hegemony Value, each polity getting a variation from the mean of the Zone’s other values and a name. Their economies become more dynamic, having Net Trade of “Stuff from [Polity]” with each other... and a simple war and conquest mechanic. History generation calculations happen more frequently but represent less time (1 minute = 6 months)
...5-10: zones assign systems names, % of polity value, discrete resources, number of planets, warp lanes, Discrete military presence, and General economic simulation (Industrial production, Mining output, Economic Stability, Tech advances, etc) Factions and NPCs now form, these will not always be very important to you, but major developments here can cause major changes for the player and you will want to pay at least some attention to them, these are your big-kahuna neighbors.
...2-5 jumps away: these are fully functional, real-time, but mechanically simplified systems

metacosmic wrote:One idea I'm wondering if you've considered for the AI is observational learning.
Honestly, this is the ideal solution, but machine learning is difficult and computationally expensive for a single AI, let alone thousands. I truly hope to one day see this sort of thing in LT, but I HIGHLY doubt it would be even remotely feasible in 1.0 :geek:
Image
Challenging your assumptions is good for your health, good for your business, and good for your future. Stay skeptical but never undervalue the importance of a new and unfamiliar perspective.
Imagination Fertilizer
Beauty may not save the world, but it's the only thing that can
Post

Re: [Josh] Monday, May 21, 2018

#78
Hyperion wrote:
metacosmic wrote:One idea I'm wondering if you've considered for the AI is observational learning.
Honestly, this is the ideal solution, but machine learning is difficult and computationally expensive for a single AI, let alone thousands. I truly hope to one day see this sort of thing in LT, but I HIGHLY doubt it would be even remotely feasible in 1.0 :geek:
I don't think it is machine learning, it's actually just copying. If faction A is a similar size to faction B, and faction B decides to build a station at location x, then faction A has a random chance of directly copying faction B's action. Maybe change location by a random amount.
A life well lived only happens once.
Seems deep until you think about it.
Post

Re: [Josh] Monday, May 21, 2018

#79
The idea of Discipline as an internal personality trait is very close to how I was suggesting Josh's "Lawful/Lawless" trait could be applied to NPC reliability. So that sounds good to me.

I do wonder about NPCs being able to improve this trait, however. From a pure gameplay sense, sure, you could do it. But it's sort of odd from both a typical-RPG and a real-humans perspective: usually characters can improve learned skills, but not innate attributes (Str, Int, Wis, etc.) or traits (Gregarious, Stable, Energetic, etc.). I think Disciplined (a high Lawful value) is pretty clearly a trait rather than a skill, so personally I'd stick with that being something that's fixed permanently for every NPC... but that's me.

Finally, on universe generation, I don't know about y'all, but I've been notionally imagining the universe generation code as its own thing... but now I'm reassessing that. Why wouldn't it just be the same code that adds new star systems as the player (or the player's immediate lieutenants?) travels near the edge of the known universe, with the only difference being that the game starts with this code operating on an empty data set (the Big Bang)?

For those whose eyes are rolling into the backs of their heads because this is So Obvious, good for you. I mention it here because it connects the idea of a PRNG generating an invariant sequence of values to the idea that as long as no player inputs request a value from this sequence, then every game universe will be identical if their seed + code + elapsed time are identical (where "elapsed time" is a stand-in for "index number of values retrieved from the PRNG"). It doesn't matter how long you let the universe generator run -- as long as the 1,000th, and 10,000th, and millionth (and so on) values from the PRNG are the same for each pass through the same code, the universes generated will be identical in every respect.

But the moment some action external to this system -- such as a player action -- requests a pseudorandom number out of the invariant sequence, that is the instant at which that universe will start to diverge from all others. Even if that single request for a random number is the only thing I ever do in my universe, it is now irrevocably different from everyone else's that started with the same code and seed. And the divergence will increase over time with every new number our universes request from the PRNG, because now those numbers will never be the same.

I don't know; I just think that's neat.
Post

Re: [Josh] Monday, May 21, 2018

#80
Flatfingers wrote:
Mon Jun 11, 2018 2:19 pm
The idea of Discipline as an internal personality trait is very close to how I was suggesting Josh's "Lawful/Lawless" trait could be applied to NPC reliability. So that sounds good to me.

I do wonder about NPCs being able to improve this trait, however. From a pure gameplay sense, sure, you could do it. But it's sort of odd from both a typical-RPG and a real-humans perspective: usually characters can improve learned skills, but not innate attributes (Str, Int, Wis, etc.) or traits (Gregarious, Stable, Energetic, etc.). I think Disciplined (a high Lawful value) is pretty clearly a trait rather than a skill, so personally I'd stick with that being something that's fixed permanently for every NPC... but that's me.

Finally, on universe generation, I don't know about y'all, but I've been notionally imagining the universe generation code as its own thing... but now I'm reassessing that. Why wouldn't it just be the same code that adds new star systems as the player (or the player's immediate lieutenants?) travels near the edge of the known universe, with the only difference being that the game starts with this code operating on an empty data set (the Big Bang)?

For those whose eyes are rolling into the backs of their heads because this is So Obvious, good for you. I mention it here because it connects the idea of a PRNG generating an invariant sequence of values to the idea that as long as no player inputs request a value from this sequence, then every game universe will be identical if their seed + code + elapsed time are identical (where "elapsed time" is a stand-in for "index number of values retrieved from the PRNG"). It doesn't matter how long you let the universe generator run -- as long as the 1,000th, and 10,000th, and millionth (and so on) values from the PRNG are the same for each pass through the same code, the universes generated will be identical in every respect.

But the moment some action external to this system -- such as a player action -- requests a pseudorandom number out of the invariant sequence, that is the instant at which that universe will start to diverge from all others. Even if that single request for a random number is the only thing I ever do in my universe, it is now irrevocably different from everyone else's that started with the same code and seed. And the divergence will increase over time with every new number our universes request from the PRNG, because now those numbers will never be the same.

I don't know; I just think that's neat.

it rubs me very wrong to think that me firing a gun (and thus requesting a number from the pRNG stream) changes the result of some other dice roll.
i'd insert a general time stamp (simulation tick count) and some local variables (object ID, maybe something derived from location).

so everytime a dice is rolled its independent from all other dice rolls.
(it also prevents race conditions between rolls so stuff stays deterministic)
Post

Re: [Josh] Monday, May 21, 2018

#81
Cornflakes_91 wrote:
Mon Jun 18, 2018 9:28 am
Flatfingers wrote:
Mon Jun 11, 2018 2:19 pm
a PRNG [generates] an invariant sequence of values [so] that as long as no player inputs request a value from this sequence, then every game universe will be identical if their seed + code + elapsed time are identical (where "elapsed time" is a stand-in for "index number of values retrieved from the PRNG"). It doesn't matter how long you let the universe generator run -- as long as the 1,000th, and 10,000th, and millionth (and so on) values from the PRNG are the same for each pass through the same code, the universes generated will be identical in every respect.

But the moment some action external to this system -- such as a player action -- requests a pseudorandom number out of the invariant sequence, that is the instant at which that universe will start to diverge from all others. Even if that single request for a random number is the only thing I ever do in my universe, it is now irrevocably different from everyone else's that started with the same code and seed. And the divergence will increase over time with every new number our universes request from the PRNG, because now those numbers will never be the same.

it rubs me very wrong to think that me firing a gun (and thus requesting a number from the pRNG stream) changes the result of some other dice roll.
i'd insert a general time stamp (simulation tick count) and some local variables (object ID, maybe something derived from location).

so everytime a dice is rolled its independent from all other dice rolls.
(it also prevents race conditions between rolls so stuff stays deterministic)

I'm curious why you have that reaction. What is it you're expecting from this game that you think you couldn't get if there's a single PRNG that supplies values for every requestor? I'm not disagreeing; if there's some reason why this is undesirable I'd like to understand that.

For now, let me ask: what are the options? I can think of three -- which of these is closest to what you're proposing?

1. One PRNG that supplies all requests: fully deterministic (assuming same code + seed + request #) until the player does something that needs a pseudorandom number.
2. Every single request for a PRN spawns its own PRNG with its own seed: not deterministic at all; every universe is immediately different.
3. The world and the player get their own PRNG: again fully deterministic, but now only until the player changes some object in the world that an NPC might access.

#3 seems closest to what you're suggesting. But even here this stops being deterministic as soon as the player changes the world. If we all create a new universe with the same seed value, we'll all get Asteroid 3B4KT-9X4 in exactly the same location of the same star system. But even if we give World and Player their own PRNGs, as soon as I mine resources from Asteroid 3B4KT-9X4 and you don't, I have changed the RNG-dictated path through the code in my universe: Asteroid 3B4KT-9X4 is now different for my NPCs, and they will no longer be requesting the same random numbers as your NPCs. And mining an asteroid is just one example; anything I do that changes what NPCs can access will alter the sequence of requests for random numbers from the World PRNG.

At this point, your universe and mine will start to diverge. Maybe not at the same rate as Option #1, but given enough time any divergence will spread throughout the universe. It appears to me that player changes are guaranteed to destroy determinism even if you use separate PRNGs. (Again, this is unless some code is added to try to damp changes... though I can't guess if that's even possible; Claude Shannon might forbid it.)

Do you think I'm missing something in this analysis?
Post

Re: [Josh] Monday, May 21, 2018

#82
Games like XCOM and JaggeAlliance use an RNG that always behaves the same, unless an action was changed. It basically resets the seed.
This was done to prevent people from just reloading and trying the exact same action again for a different result (like not missing a shot this time).

There could be seperate RNGs (seeds) for different actions in the game.
Such that a strategic decision of an AI after a reload will have the same RNG (seed) basis (that determines a random choice), unless the situation changed (someone else pulling from the RNG source to make a strategic decision).

This is then separate for the RNG supplying data for fights, visual effects etc.

In this setup a single gunshot will not change the course of the universe. But the decision to shoot down a trade-station will, as the AIs deciding how to replan their trade-route will now pull a different number from the RNG pool.

In a load/reload scenario, this will offer a certain continuity to the global events. The player must do something of a certain scale to change the course of history.
Post

Re: [Josh] Monday, May 21, 2018

#83
Damocles wrote:
Thu May 24, 2018 9:19 am
Further ideas on using the heatmap data:

When combining several sector-heatmaps, they can create a more specific solution for AI decisions:

#1 heatmap tracking past economic sucess (regular profits)
#2 heatmap tracking competitor density
----
subtracting #2 from #1 will create a heatmap indicating midterm unsupplied market opportunities.

...
Heatmaps for a steering-algorithm style AI seems to be the right idea.
Was stuck on how to make Agents work as a group last year, tried genetics with limited success (post-conquest diffusion broke it), have since considered Trust: a heatmap of who/where/what was involved with a successful outcome (satisfaction of other base instincts). The hotter something is in this heatmap, the more it will pull the Agent's decision vector.
For example: Agent Harry is getting fed & laid quite well in the company of Agents Betty and Sue. Eating & sex are Harry's strongest motivators, so he will prefer working with Betty & Sue over strangers, or even others he has more history with but with less successful outcomes. This way a sudden glut of success can pull an Agent away from its closest friends and family... This should create short-term economic/political blips similar to ISIS, Communism, the Taiping... Tulips.
This mechanic should also give rise to things like brand-loyalty, superstitions & willful obsolescence.

Totally haven't tested this yet (too much work on) so could be wrong.
Post

Re: [Josh] Monday, May 21, 2018

#84
cpb wrote:
Fri Jul 13, 2018 5:03 am
Heatmaps for a steering-algorithm style AI seems to be the right idea.
Was stuck on how to make Agents work as a group last year, tried genetics with limited success (post-conquest diffusion broke it), have since considered Trust: a heatmap of who/where/what was involved with a successful outcome (satisfaction of other base instincts). The hotter something is in this heatmap, the more it will pull the Agent's decision vector.
For example: Agent Harry is getting fed & laid quite well in the company of Agents Betty and Sue. Eating & sex are Harry's strongest motivators, so he will prefer working with Betty & Sue over strangers, or even others he has more history with but with less successful outcomes. This way a sudden glut of success can pull an Agent away from its closest friends and family... This should create short-term economic/political blips similar to ISIS, Communism, the Taiping... Tulips.
This mechanic should also give rise to things like brand-loyalty, superstitions & willful obsolescence.

Totally haven't tested this yet (too much work on) so could be wrong.
Hello to the forum.

Heatmaps are good for handling spatially separated data, evolving this data (reinforcement, dampening, forgetting) and combining different dataset into the same spacial location.
The combination of those datasets (adding, substracting, theshold etc) can be implemented with a simple kernel. And manually (or even genetically) tuning the combinatorial factors (logic of combining heatmaps, speed of gaining and loosing heat at a point, decision thresholds) can easily alter the decisionmaking of the actors. Good for data-driven testing.
And they can make nice 2D/3D graphs, (easier to debug than a list of floatingpoint numbers...)

The simplest example would be a heatmap "where not to go" for traders. Recent points of pirate attacks increase heat. The path-planner (A* for example) will avoid those locations (higher cost of travel there) unless the alternative route is too long.
The heat-value reduces over time, making areas without recent pirate attacks assumed to be save again.

It can also handle a situation of limited knowledge. Area that the actor has no knowledge about get a default value / heuristic value. Areas that are known get their actual value.
That allows to make a founded decision even in the (partial) absence of knowledge, and then adapting later decisions by learning (updating the heatmap with the actual values)

Online Now

Users browsing this forum: No registered users and 5 guests

cron