Page 2 of 2

Re: Player position affects biter attacks

Posted: Thu Apr 02, 2015 7:43 am
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.

Re: Player position affects biter attacks

Posted: Thu Apr 02, 2015 1:46 pm
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.

Re: Player position affects biter attacks

Posted: Thu Apr 02, 2015 8:17 pm
by SteelGiant
20x game speed? FFFFFFFFUUUUUUUUUUUUUUUUUUU :oops:

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

Re: Player position affects biter attacks

Posted: Mon May 25, 2015 12:30 am
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.

Re: Player position affects biter attacks

Posted: Mon May 25, 2015 9:54 am
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

Re: Player position affects biter attacks

Posted: Tue May 26, 2015 3:54 pm
by TypeO
#factorioproblems

Great read btw.

Re: Player position affects biter attacks

Posted: Tue May 26, 2015 10:16 pm
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:

Re: Player position affects biter attacks

Posted: Wed Jun 03, 2015 1:45 pm
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.