Medieval Battle Simulation

From Simulace.info
Revision as of 12:25, 20 January 2019 by Xlazl00 (talk | contribs)
Jump to: navigation, search

Introduction

This model simulates a medieval battle between two armies (blue vs red).

Problem definition

The main goal is to find which formations and compositions of units work against which.
Two armies fight each other on a battlefield. An army is composed of several units in a certain formation.
When simulation is started the armies move against each other, killing the units of the opposing army.
When one army has no units left alive it is considered defeated and simulation is over.
There is a limit to how many units an army can have, each unit type has a cost.
Sum of costs cannot be greater than cost limit (600). Furthermore, an army cannot have more than 32 units of the same type.

Method

I am using NetLogo to simulate movement and combat of the units.
I have selected certain scenarios which bring out differences in military strategies.
Each scenario is run 5 times. More runs would ensure higher certainty of results.

Scenario A
Same composition of units and formations.
A1: line vs line A2: square vs square A3: wedge vs wedge

Scenario B
Same composition of units, different formations.
B1: line vs square B2: line vs wedge B3: square vs wedge

Scenario C
Knights centric Blue vs Spearmen centric Red
C1: line vs line C2: square vs square C3: wedge vs wedge C4: line vs square C5: line vs wedge C6: square vs wedge

Scenario D
Swordsmen centric Blue vs Spearmen centric Red
D1: line vs line D2: square vs square D3: wedge vs wedge D4: line vs square D5: line vs wedge D6: square vs wedge

Scenario E
Generic Blue vs Max number of units Red
D1: line vs line D2: square vs square D3: wedge vs wedge D4: line vs square D5: line vs wedge D6: square vs wedge

Model

This is how I set up the model.

Units Spearmen

Swordsmen

Knights

Formations Line - Square - Wedge -

Results

Conclusion

Code