All Projects → umitkaanusta → Jomini

umitkaanusta / Jomini

Licence: mit
Historical battle simulation package for Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Jomini

PVSystems
A Modelica library for photovoltaic system and power converter design
Stars: ✭ 20 (-35.48%)
Mutual labels:  simulation, modeling
Megaglest Source
MegaGlest real-time strategy game engine (cross-platform, 3-d)
Stars: ✭ 259 (+735.48%)
Mutual labels:  strategy, strategy-game
libROM
Model reduction library with an emphasis on large scale parallelism and linear subspace methods
Stars: ✭ 66 (+112.9%)
Mutual labels:  simulation, modeling
COMOKIT-Model
A GAMA (http://gama-platform.org) model on the assessment and comparisons of intervention policies against the CoVid19 pandemics
Stars: ✭ 23 (-25.81%)
Mutual labels:  simulation, modeling
Ditras
DITRAS (DIary-based TRAjectory Simulator), a mathematical model to simulate human mobility
Stars: ✭ 19 (-38.71%)
Mutual labels:  modeling, simulation
data-science-notes
Open-source project hosted at https://makeuseofdata.com to crowdsource a robust collection of notes related to data science (math, visualization, modeling, etc)
Stars: ✭ 52 (+67.74%)
Mutual labels:  simulation, modeling
megaglest-data
MegaGlest real-time strategy game data / assets
Stars: ✭ 29 (-6.45%)
Mutual labels:  strategy, strategy-game
Gama
Core plug-in projects of the GAMA platform
Stars: ✭ 196 (+532.26%)
Mutual labels:  modeling, simulation
Simpeg
Simulation and Parameter Estimation in Geophysics - A python package for simulation and gradient based parameter estimation in the context of geophysical applications.
Stars: ✭ 283 (+812.9%)
Mutual labels:  modeling, simulation
Kam remake
"KaM Remake" is an RTS game remake written in Delphi from scratch.
Stars: ✭ 277 (+793.55%)
Mutual labels:  strategy, strategy-game
terrain generator
A wizard that generates terrains for Gazebo using height maps.
Stars: ✭ 46 (+48.39%)
Mutual labels:  simulation, model
Fastscape
A fast, versatile and user-friendly landscape evolution model
Stars: ✭ 22 (-29.03%)
Mutual labels:  modeling, simulation
mcnp
📊复杂网络建模课程设计. The project of modeling of complex networks course.
Stars: ✭ 69 (+122.58%)
Mutual labels:  simulation, model
Imagine Old
Modeling and simulations using computational graphs
Stars: ✭ 25 (-19.35%)
Mutual labels:  modeling, simulation
modeling-website
Landing page for project sites
Stars: ✭ 16 (-48.39%)
Mutual labels:  model, modeling
Vehicle-Dynamics-Lateral
OpenVD: Vehicle Dynamics - Lateral
Stars: ✭ 50 (+61.29%)
Mutual labels:  simulation, modeling
Network traffic modeler py3
pyNTM - This is the network traffic modeler written in python 3: pip3 install pyNTM
Stars: ✭ 93 (+200%)
Mutual labels:  modeling, model
Bmtk
Brain Modeling Toolkit
Stars: ✭ 177 (+470.97%)
Mutual labels:  modeling, simulation
Triplea
TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
Stars: ✭ 268 (+764.52%)
Mutual labels:  strategy, strategy-game
Ancientbeast
Turn Based Strategy Game. Master your beasts! 🐺
Stars: ✭ 907 (+2825.81%)
Mutual labels:  strategy, strategy-game

Jomini v0.1.4

Jomini GitHub license Maintenance

ForTheBadge built-with-love

Jomini creates military simulations by using mathematical combat models. Designed to be helpful for game developers, students, history enthusiasts and -to some extent- scientists. You can mail me at [email protected] if you want to contribute.

To download: https://pypi.org/project/Jomini

Documentation will be available in the next update.

Lanchester Models 101

This package uses the combat models developed by Frederick William Lanchester, a.k.a one of the founding fathers of Operations Research.

  • Lanchester Models are deterministic, which means the model will always yield the same result for the same input parameters.
  • Lanchester Models view battles as an attrition model, therefore manuevers and sudden changes during the battle can not be represented.
  • You might need to do some manual fine-tuning if you are not able to get quality parameters (rho, beta, engagement_width) from a data set.
  • Despite the downsides, even the primitive models developed by Lanchester himself works wonders with the right parameters.

Code Sample: Lanchester's Linear Law

  • The Linear Law is based on force concentration
  • Good for modelling melee battles and unaimed fire (artillery, arquebus, handcannon etc.)
from jomini.Lanchester import Battle, LinearLaw

# Re-creating the Battle of Cerignola (AD 1503)
# In the actual battle, Spanish(red) lost 500 men while the French(blue) lost 4000 men
# Parameters rho, beta, engagement_width and time are manually fine_tuned
b = Battle(red=6_300, blue=9_000, rho=0.0800, beta=0.0100)
L = LinearLaw(b, engagement_width=100)
print(L.get_casualty_rates()) # Returns casualty rates 
print(L.get_casualties(time=7))
print(L.get_remaining(time=7))
print(L.simulate_battle(time=7))

Linear Law

Code Sample: Visiting models used in Jomini

  • Square Law: Given equal power coefficients, the fighting power is proportional to the square of army size.
    • Good for modelling aimed fire (e.g Napoleonic line-battles)
  • Logarithmic Law: Basically square law at a larger scale, used by Weiss to model the American Civil War
    • Good for modelling tank combat as well
from jomini.Lanchester import Battle, LinearLaw, SquareLaw, LogarithmicLaw, GeneralLaw

# Simulating a fictitious battle with each of the laws
b = Battle(red=20_000, blue=30_000, rho=0.0150, beta=0.0120)
Linear = LinearLaw(b, engagement_width=500)
Square = SquareLaw(b)
Log = LogarithmicLaw(b)
Generalized = GeneralLaw(b, engagement_width=500, p=0.450, q=0.600)

# If time is not specified, the battle goes on until one side is annihilated.
print(Linear.simulate_battle() + "\n")
print(Square.simulate_battle() + "\n")
print(Log.simulate_battle() + "\n")
print(Generalized.simulate_battle())

Model-1 Model-2

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].