Player position affects biter attacks

Post all other topics which do not belong to any other category.
User avatar
cube
Former Staff
Former Staff
Posts: 1111
Joined: Tue Mar 05, 2013 8:14 pm
Contact:

Re: Player position affects biter attacks

Post by cube »

We were trying to not let the conditional activation influence anything important -- the only time when biters are turned off is when they are in the idle mode (random walking around) and nobody sees them. Spawners are active any time there is pollution on the chunk or when there are some enemies missing form its spawn limit. If some units are sent for an attack, they are always active.

daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Player position affects biter attacks

Post by daniel34 »

SteelGiant wrote:When you say the results were always the same, do you mean that they were deterministically identical, or that there were small differences, but the ordering of which base was attacked most stayed the same? Do you have your full results recorded? (Of course if they were deterministically identical then there is no point in looking at replicates.)
I'd say they were actually deterministically identical. I did watch all the tests on x20 gametime on the minimap (map is too big to zoom out in normal mode) and they always attacked in the same order at the same time, as far as I can tell. Also, the position next to the biter bases where they did group before an attack was the same each test.
Sometimes I checked the remaining charge and it was always the same. I don't have any results recorded, because from the first few tests it was obvious that the result was the same.
SteelGiant wrote: I think in order to be sure about things we need to find a way to make the simulations diverge so that we have independent simulations to look at. This might be achievable by starting the player with a biter next to them which you have to kill at your leisure, which should hopefully be impossible to do identically in multiple simulations.
I just tried that. Because in the scenario the player starts with no inventory at all, I went into the map editor and placed a chest with ammo and a gun next to the player. Then I ran a control test, just loading the scenario and letting it run without any input. Result: completely different order and timing/damage of attacks.
Then I killed a few biters at the start and the result was completely different again.
ssilk wrote: A stupid thougt: the devs try to optimize the game as much as possible. From that sight the question "will the character influence the biter behavior, even if it is 'behind some limit'?" must be answered clearly with "no". Because such calculations are always expensive, if made with hundreds of biters, that might be around you factory.
I actually was surprised by that. Before I started the tests I was convinced that there would be a change in biter behavior depending on the player's movement. I wasn't sure whether the biters would attack more towards the player's direction but I was thinking there had to be some variance to the biter attacks depending on player movement.

Usually, games like Factorio use some kind of random number generator (RNG) to randomize the game. Like, for example, which outpost the biters would attack. Computers can't just generate random numbers. Most RNGs work by using a number as a seed and then apply some mathematical formula to generate some apparently random sequence of numbers. Same seed --> same sequence. Usually used as seed (or part of it) is the current time, which would mean that each run would be different somehow.
Factorio, however, is deterministic and doesn't rely on time, which is required for replays (the game just running on a series of inputs already made before, always giving the same result) and multiplayer (so that every player's game makes the same decisions). This is the reason that runs on the same scenario yield the same results.
However, I thought that the randomness of the game would be influenced by inputs given by the player, like movement of the character. So I was pretty surprised that running around didn't change the result at all and biters still attacked the same.
I did have two explanations:
1) Player movement doesn't alter randomness
2) Biters don't consider randomness when attacking, only pollution

Given the result above with the ammo/gun chest, which doesn't change pollution but changes the biter attacks, it seems that biters do react on some kind of randomness and that player movement alone doesn't influence it, but interacting with the biters does.
quick links: log file | graphical issues | wiki

SteelGiant
Inserter
Inserter
Posts: 40
Joined: Thu Sep 11, 2014 12:14 pm
Contact:

Re: Player position affects biter attacks

Post by SteelGiant »

20x game speed? FFFFFFFFUUUUUUUUUUUUUUUUUUU :oops:

Yes that might make these tests slightly more efficient...

User avatar
db48x
Fast Inserter
Fast Inserter
Posts: 106
Joined: Wed Mar 13, 2013 12:15 pm
Contact:

Re: Player position affects biter attacks

Post by db48x »

SteelGiant wrote:20x game speed? FFFFFFFFUUUUUUUUUUUUUUUUUUU :oops:

Yes that might make these tests slightly more efficient...
Another thing you could do is write a mod that records the data to a file automatically as the game progresses.

kingarthur
Smart Inserter
Smart Inserter
Posts: 1459
Joined: Sun Jun 15, 2014 11:39 am
Contact:

Re: Player position affects biter attacks

Post by kingarthur »

one thing ive noticed and im not sure is being accounted for here is the fact that biters will always attack the same target the same way with only the biters amount and size increasing as evolution increases. if both bases in the original test are exactly the same in the size, shape, distance, and items present. then the attacks will be basically the same for ever if nothing is changed. so they might not react to the player directly but they do change targets if something changes inside the base (i.e. radar is placed, player comes by, robot flies by). so the player coming into the base could be affecting their target choice and changing their path and that could change the way the turrets respond with more or less energy usage.

tl:dr. any change in the target location will affect the biters attack and that could cause increased energy demands as more lasers fire

TypeO
Burner Inserter
Burner Inserter
Posts: 7
Joined: Tue Apr 29, 2014 1:24 pm
Contact:

Re: Player position affects biter attacks

Post by TypeO »

#factorioproblems

Great read btw.

Cougarific
Long Handed Inserter
Long Handed Inserter
Posts: 51
Joined: Thu Feb 26, 2015 11:14 pm
Contact:

Re: Player position affects biter attacks

Post by Cougarific »

TypeO wrote:#factorioproblems
Great read btw.
I know right? Part of me wants this on Steam, part of me's like - That'd be the end of the super-smart discussions, prepare for "I KANT FIND TEH START BUTUN!" :cry:

roothorick
Long Handed Inserter
Long Handed Inserter
Posts: 92
Joined: Mon Aug 11, 2014 5:22 am
Contact:

Re: Player position affects biter attacks

Post by roothorick »

Here's a theory: chunk update order. Perhaps the player's position determines in what order the chunks "tick". This would influence the source of the pollution "sensed" by the hives, and therefore the pollution source the attack is most likely to target.

To that end, testing in multiplayer would be very interesting. Experiment with how many players present and at which outposts.

Post Reply

Return to “General discussion”