Jump to content

IA


Ermit

Recommended Posts

Is there a place to read information about zombie behavior?

But something concrete and definite. For example...

 

*They are able to jump 6 blocks

* They go the long way if the shortest is blocked... *

 

Etc... etc... Style stuff. But that they are not simple loose concepts in patch notes varying from version to version. Or at least if they are, but that they are all grouped so that a clear interpretation of the artificial intelligence can be taken out.

 

(Apologies for my English)

Link to comment
Share on other sites

Hi,

 

This is currently changing with every minor version. I am not sure you can find the behaviour described in the xml. There are a few tests and comments on youtube and forums, but you have to track on which version it was done.

 

The best is probably to test into creative mode.

 

My current findings (A17.2) are:

 

* Paths

- They need a continuous path to you (without any jump), or they will attack basements (base rampage mode).

- This makes "loop" base now fail (at least the base version with player standing in a cage with a 2/3 block gap).

 

- They go the long way if the shortest is blocked, but there is a maximum length allowed, and it depends on zombie types (hence not all follow the same path, also it is supposed to be randomized). They prefer a long continuous path to a shorter path with jumps. This makes "maze" bases work.

- Also this depends on lengths and durability of blocks on the shortest path (there is conversion durability-> length). Wood is ok for a 20-length path., but they might decide to go through weaker materials.

 

- Exceptions: a zombie might go to a path with a jump, but only if it follows you and only the first time, or if they can't do anything else (eg a bridge on top of the map).

 

* Jumps

- The jump length depend on zombie type (the fatter the smaller).

- Most can jump 3 blocks away, but because they seek for a path, they will not do it often.

- The maximum is radiated wrights, sometime performing a 6 length jump, and of course spiders).

- The jump height is < 1.5 block. They will attack you or your standing block if you are at 1,5, but will try a path to you if you stand at 2.

 

* Blocks

- Most non full blocks are seen as empty (pole).

- Barbed wire (no wood support) are seen as empty, barbed wire with support are seen as full.

- Doors/hatch are seen full when closed, but empty when opened.

 

* Half block

- Half block (and wedge tip) are seen as full, except when it is rotated in the top position.

- Hence the "toothless" structure works (similar to toothie but without pole : 1 block on ground, 1 empty block above, and 1 half block above facing up). Although quite a glitch, it is now much more balanced compared to the legacy toothie: it will let dog and spiders come in , and has lower integrity because of the empty block.

- They will rarely jump a "double half hole" (ie 2 opposite half block). It is seen as a continuous path and Zs will most often fall). It may depend on the length of the platform before the gap though.

 

 

* Path break

- When their path breaks (ie they thought they could go but did not - "double half hole" or horizontal pillar 50), they randomly attack around them for a few seconds, but not necessarily the basements. So this is different from the base rampage mode.

- Then they go back to the path if it exists, or in base rampage mode.

- The attack occurs on both the falling gap (pillar50, half block), and also the landing zone (so make sure basement is a few block away).

 

* Misc

- If you vanish, they track your last known location for 30s.

- Screamers seem to go to the player rather than the source of heat (a recent test from Capoo on youtube)

Link to comment
Share on other sites

  • 2 weeks later...

A few info can actually be found in entityclasses.xml:

 

1) Properties JumpMaxDistance, JumpStrength, CanClimbVertical...

 

2) IA modes:

<property name="AITask-1" value="BreakBlock"/>

<property name="AITask-2" value="DestroyArea"/>

<property name="AITask-3" value="Territorial"/>

<property name="AITask-4" value="ApproachDistraction"/>

<property name="AITask-5" value="ApproachAndAttackTarget" param1="EntityNPC,0,EntityPlayer,0"/>

<!-- class,maxChaseTime (return home) -->

<property name="AITask-6" value="ApproachSpot"/>

<property name="AITask-7" value="Look"/>

<property name="AITask-8" value="Wander"/>

<property name="AITarget-1" value="SetAsTargetIfHurt" param1="EntityNPC,EntityPlayer"/>

<property name="AITarget-2" value="BlockingTargetTask"/>

<property name="AITarget-3" value="SetNearestCorpseAsTarget" param1="EntityPlayer"/><property name="AITarget-4" value="SetNearestEntityAsTarget" param1="EntityPlayer,0,EntityNPC,0"/>

 

I am not sure what these correspond to. From my testing, I would define 5 main IA states:

1) Wandering: Z did not detect you. It could correspond to "Territorial", "Look", "Wander", "Approach".

2) Chasing (dumb): Z found a path to you and is close to attacking you. So if you jump over a few block gaps, Z will also try to follow and jump. This is the only mode when a Z will attempt an horizontal jump over gaps >= 1 block.

3) Pathing (smart): Z found a (long) path to you and is taking it. This path must NOT have jump. Zombies won't jump over gaps in this mode (but can jump 1 high to climb "stairs").

4) Destroy (smart): Z has no path to you, but detects you. He will smartly destroy the support of the structure you are standing on

5) Frustration (dumb, I called it path break in my previous answer) : Z thought it had a path to you, but failed to hit you (he felt in tricky gaps, player moved to another structure, other Z blocking ...): Z will destroy whatever is around, even if it does not structurally support you. This only last like 3 seconds.

 

Until now, I can explain all my tests and why base design work or fail with this 5 state model. Comments or contradictions welcomed :)

Link to comment
Share on other sites

I also noticed weird behavior with how the pathing algorithm updates. I was in creative mode trying to measure the longest path Z would take before starting to destroy.

 

I was using a simple U shape structure in wood, 2 high, standing on the base of the U, spawning Z below the U, and having path on the top of the U. I was able to incrementally increase the length of the U, having Z following a path of length 50 ! I was happy and logged out.

 

When I returned, the Z would no longer take the 50 len path, instead, they would try to break the U structure at some precise location corresponding to a 20 len path !

 

I learned 4 things:

1) Always restart game to test pathing.

2) A long path chosen by the IA (mode "Pathing") can include destroying some blocks, without turning Z into destroy mode.

3) Looking where the Z decides to attack the U is a good measure of its maximum length (modulo the resistance of the blocks he targets, which was wood frame)

4) We can probably use the way the algorithm dynamically updates its path, by constantly adding/removing blocks (or closing/opening strong doors, some youtubers do it in maze bases with multiple paths). This is much harder to test ofc, but don't forget the path finding algorithm is dynamic, has lag updating, and builds the next path on the previously found one (as shown by my incremental experiment reseting on restart)

 

 

On a personal note, I must say that although A17 limits the diversity of working base designs, which is a disappointing at first when you like the base building aspect, it opens the possibility to actively use 4) in the base construction. There is a whole new dynamic perspective to base design (and active defense) that is totally new and I guess still overlooked.

 

It is unsure yet if it's viable, and if the proper timing can be found to channel the periodic motions of Zombies arriving at random times.

Link to comment
Share on other sites

entity.xml gives the jump length

- zombieTemplateMale : 3.3

- Wight Feral: 4.8

- Cop: 0

- Spider : 8 (feral=12)

Now, the actual length might be affected by ground speed.

 

In any case, jump only occur when the Z is in "follow" mode, which seems to be limited at 4 block range.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...