Skip to Content

Overview

This document summarizes research on predator hunting techniques, prey selection, ambush strategies, and pack coordination. Better Ecology implements multiple hunting strategies based on real predator behavior research.

Key Behavioral Patterns

Prey Detection and Selection

  • Hunger-driven activation: Predators only hunt when hungry (below hunger threshold)
  • Prey availability check: Scavenging preferred over hunting when meat items are available nearby
  • Optimal target selection: Prey scored by distance, health, and isolation
  • Isolation factor: More isolated prey (fewer nearby allies) are preferred targets

Target Selection Formula:

Score = (distance × 0.5) + (healthFactor × 100) + (isolationFactor × 50)

Lower scores are preferred (nearest, weakest, most isolated).

Hunting Techniques

Direct Pursuit (General)

Implementation: HuntPreyGoal

Standard chase-down hunting used by most predators.

ParameterValue
Hunt RangeConfigurable (typically 16-32 blocks)
Attack Distance2 blocks
Attack Cooldown20 ticks (1 second)
Give Up Time1200 ticks (60 seconds)
Escape Distance32 blocks
Hunger Restored40 points per kill

Behavior sequence:

  1. Check hunger threshold
  2. Verify no scavengeable food items nearby
  3. Find valid prey within hunt range
  4. Score and select optimal target
  5. Pathfind toward prey
  6. Attack when within range
  7. Continue until prey killed, escaped, or predator satisfied

Fox Pounce Attack

Implementation: FoxPounceHuntingGoal

Distinctive high-arc leap attack based on real fox mousing behavior.

ParameterValue
Min Pounce Distance3 blocks
Max Pounce Distance8 blocks
Pounce Height1.5 blocks
Success Rate80%
Pounce Duration15 ticks
Cooldown40 ticks
Hunger Restored35 points per kill

Scientific Basis: Foxes perform a distinctive hunting technique where they leap 1-2 meters high in a parabolic arc to land on small prey like mice. Research shows this technique has a ~75-80% success rate in the wild.

Pounce Arc Calculation:

double parabolaHeight = POUNCE_HEIGHT * Math.sin(progress * Math.PI);

Cat Stalking Ambush

Implementation: CatStalkingAmbushGoal

Patient approach with ambush attack.

ParameterValue
Stalk Speed0.4x normal
Ambush Distance3 blocks
Success Rate30%
Cooldown60 ticks

Behavior sequence:

  1. Detect prey
  2. Approach slowly (stalking animation)
  3. Position for ambush
  4. Explosive attack when in range

Pack Hunting Coordination

Implementation: WolfPackHuntCoordinationGoal

Wolves coordinate hunting as a pack with role assignment.

Role Assignment

RoleBehavior
AlphaLeads the hunt, initiates attack
FlankerPositions to cut off escape
DriverPushes prey toward alphas

Coordination Mechanics

  • Pack ID matching: Only wolves in the same pack coordinate
  • Target sharing: Pack members share the same prey target
  • Flanking positions: Wolves spread to surround prey
  • Attack timing: Coordinated attack order based on role

Scientific Basis

Based on wolf pack dynamics research showing:

  • Social hierarchies influence hunting roles
  • Coordinated flanking increases success rate
  • Pack size affects hunting efficiency
  • Prey selection considers pack capabilities

Species-Specific Behaviors

Wolves

Prey targets: Sheep, Rabbit, Chicken (when hungry)

BehaviorDescription
Pack huntingCoordinates with pack members
Food sharingShares kills with hungry pack members
ScavengingPrefers existing meat over hunting
TerritorialHunts within pack territory

Foxes

Prey targets: Chicken, Rabbit

BehaviorDescription
Pounce attackHigh-arc leap for small prey
StalkingSlow approach before attack
CachingMay cache excess food
CrepuscularMost active at dawn/dusk

Cats/Ocelots

Prey targets: Chicken, Rabbit

BehaviorDescription
StalkingPatient slow approach
AmbushAttack from concealment
Gift givingTamed cats bring “gifts”
SolitaryHunt alone (no pack coordination)

Prey Response Integration

Hunting behaviors integrate with prey fleeing responses:

Predator-Prey Interaction

  1. Detection: Predator spots prey within hunt range
  2. Pursuit: Predator begins approach
  3. Flight response: Prey detects predator and may flee
  4. Escalation: Predator increases speed to catch fleeing prey
  5. Resolution: Kill, escape, or give up

Success Factors

FactorEffect on Success
Prey isolationHigher success for isolated prey
Pack sizeLarger packs have higher success
Prey healthWeaker prey easier to catch
DistanceCloser targets easier to catch
TerrainSome terrain favors predator or prey

Implementation Notes

Configuration Parameters

ParameterDefault RangeDescription
hunt_range16-32 blocksMaximum detection range
attack_distance2-3 blocksRange to initiate attack
speed_modifier1.2-1.5xMovement speed when hunting
give_up_ticks600-1200Time before abandoning hunt
hunger_threshold30-50Hunger level to trigger hunting

Performance Optimizations

  • Search interval: Prey search every 5-10 ticks, not every tick
  • Retargeting: Check for closer prey every 20 ticks
  • Path recalculation: Update paths every 10 ticks during hunt
  • Early exits: Check cheap conditions before expensive searches

Goal Priority System

PriorityGoal
4HuntPreyGoal
4FoxPounceHuntingGoal
4CatStalkingAmbushGoal
4WolfPackHuntCoordinationGoal

Hunting goals share priority 4, lower than flee (1-2) and survival needs (3).


Key Academic References

Foundational Papers

  1. Mech, L.D. (1970). “The Wolf: The Ecology and Behavior of an Endangered Species”
  2. Macdonald, D.W. (1980). “Rabies and Wildlife: A Biologist’s Perspective” - Fox hunting behavior
  3. Caro, T.M. (1994). “Cheetahs of the Serengeti Plains” - Predator-prey dynamics

Recent Research

  1. MacNulty et al. (2012). “Nonlinear effects of group size on the success of wolves hunting elk”
  2. Stander, P.E. (1992). “Cooperative hunting in lions: the role of the individual”
  3. Hilton, G.M. et al. (1999). “The effect of predator age and experience on kill probability”

See Also

Last updated on