Difference between revisions of "Medieval Battle Simulation"

From Simulace.info
Jump to: navigation, search
(Created page with "=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 un...")
 
Line 1: Line 1:
 
=Introduction=
 
=Introduction=
 
 
This model simulates a medieval battle between two armies (blue vs red).
 
This model simulates a medieval battle between two armies (blue vs red).
  
 
=Problem definition=
 
=Problem definition=
The main goal is to find which formations and compositions of units work against which.
+
The main goal is to find which formations and compositions of units work against which.<br/>
Two armies fight each other on a battlefield. An army is composed of several units in a certain formation.
+
Two armies fight each other on a battlefield. An army is composed of several units in a certain formation.<br/>
When simulation is started the armies move against each other, killing the units of the opposing army.
+
When simulation is started the armies move against each other, killing the units of the opposing army.<br/>
When one army has no units left alive it is considered defeated and simulation is over.
+
When one army has no units left alive it is considered defeated and simulation is over.<br/>
There is a limit to how many units an army can have, each unit type has a cost.
+
There is a limit to how many units an army can have, each unit type has a cost.<br/>
 
Sum of costs cannot be greater than cost limit (600). Furthermore, an army cannot have more than 32 units of the same type.
 
Sum of costs cannot be greater than cost limit (600). Furthermore, an army cannot have more than 32 units of the same type.
  
 
=Method=
 
=Method=
I am using NetLogo to simulate movement and combat of the units.
+
I am using NetLogo to simulate movement and combat of the units.<br/>
I have selected certain scenarios which bring out differences in military strategies.
+
I have selected certain scenarios which bring out differences in military strategies.<br/>
Each scenario is run 5 times. More runs would ensure higher certainty of results.
+
Each scenario is run 5 times. More runs would ensure higher certainty of results.<br/>
  
''Scenario A''
+
'''Scenario A'''
 
Same composition of units and formations.
 
Same composition of units and formations.
 
A1: line vs line
 
A1: line vs line
Line 22: Line 21:
 
A3: wedge vs wedge
 
A3: wedge vs wedge
  
''Scenario B''
+
'''Scenario B'''
 
Same composition of units, different formations.
 
Same composition of units, different formations.
 
B1: line vs square
 
B1: line vs square
Line 28: Line 27:
 
B3: square vs wedge
 
B3: square vs wedge
  
''Scenario C''
+
'''Scenario C'''
 
Knights centric Blue vs Spearmen centric Red
 
Knights centric Blue vs Spearmen centric Red
 
C1: line vs line
 
C1: line vs line
Line 37: Line 36:
 
C6: square vs wedge
 
C6: square vs wedge
  
''Scenario D''
+
'''Scenario D'''
 
Swordsmen centric Blue vs Spearmen centric Red
 
Swordsmen centric Blue vs Spearmen centric Red
 
D1: line vs line
 
D1: line vs line
Line 46: Line 45:
 
D6: square vs wedge
 
D6: square vs wedge
  
''Scenario E''
+
'''Scenario E'''
 
Generic Blue vs Max number of units Red
 
Generic Blue vs Max number of units Red
 
D1: line vs line
 
D1: line vs line
Line 54: Line 53:
 
D5: line vs wedge
 
D5: line vs wedge
 
D6: square vs wedge
 
D6: square vs wedge
 
  
 
=Model=
 
=Model=

Revision as of 12:24, 20 January 2019

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