---
author: Arjunveer Singh
title: First Basic Automated Economy Simulation in Victoria II
tags: ["Cybernetics", "Economy", "Automation", "Simulation"]
---
# First Basic Automated Economy Simulation in Victoria II
I did my first simulation of a very basic type of automated economy. Though I have previously created some models and algorithms but I want to start from the lowest level possible to make my final model as accurate and as efficient as possible. First of all, in this first simulation, I did not create a model by myself but instead I used a game for simulation. Yes you heard right, a game, I used Victoria II, although obviously its economic system is not perfect and also the game’s timeline starts in the 1800s but still it somewhat mirrors actual economic activity and also is great for a very basic experiment. After all if my models can’t work in a game, how can I expect them to work in real life, in which there are endless possibilities and uncertainties?
I chose the Russian Empire in 1836 as my nation for simulation as it has enough resources to build factories and also is powerful enough to keep me away from all wars. This run was my Heavy Industry focused economy, so I just structured my algorithm in a way in which my production of steel, cement and machine parts becomes higher than my consumption as fast as possible. I did not add this directly in the game code but instead did this manually while following my own algorithm, thus the result is late i.e. I took a bit more time than a fully automated system would take because I was doing this manually while looking at my algorithm and had to keep different things in my mind at the same time. I achieved my goal in 7 years, i.e. I achieved this in 1843 itself, though I also at the same time reduced the spending for many things as will be shown in my in-game screenshots. It was done so that I can reach my results quickly and also not to make it too complex.
I also took no action apart from what my alogrithm told me, so I bought nothing else, built no other factory, thus keeping the results as true as possible. While doing each experiment and reading more, I am myself learning more about this field because I am neither a scholar nor a professor of this field, neither this field garners much interest nowadays.
This is a very basic simulation but the upcoming ones will be progressively complex.
This was the algorithm I used, it is not a code specific algorithm, it follows a logical nature and adjusted to look as much as it can like actual code though I did not enter it in the game as I said above, rather I manually followed it.
```pseudocode
if iron_production < iron_usage then:
if treasury > required_amount_to_build_iron_factory + 8k then:
build steel factory
until iron_production > iron_usage
if any construction item < requirements then:
buy max from world market until construction items are enough
when construction items are enough:
automate trade
```
and same will follow with cement and machine parts too
Feel free to comment and share your suggestions, feedback etc.
The results are given in the below images:-