Espiocracy cover
Espiocracy screenshot
Genre: Simulator, Strategy

Espiocracy

Dev Diary #37 - Behavior of Actors 🧠

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

Actors - influential individuals and organizations, capable of changing history - are the main building block of historical simulation in Espiocracy. Today we'll explore their AI.

This is a fascinating engineering problem! We want:


  • Believable, interesting, sometimes cunning behavior
  • via ~50 adjustable and moddable actions
  • for 1500-2500 (!) actors active at any point
  • in the real-time-ish game with very limited computational budget per actor
  • without employing a team of AI programmers to craft and maintain large behavior trees or complex state machines

Playing to our strengths, we have:


  • Many historical samples. One of the best sources is CIA archive of Presidential Daily Briefs, counting thousands of reports on precisely described political activities.
  • Unlimited ability to run millions of simulations offline (= during development, before the release), to collect rich statistical data on the effects of any behavior in the game world.
  • Audience of players in 2023. Most of them do have not bad GPUs, 60% have 6+ CPU cores, 93% clock them at 2.3+ GHz, 69% use 16+ GB RAM.

If you've been anywhere near computer science in the last few years, you know where this leads to: machine learning. The game does not have computational budget for glamorous deep neural networks, but it has enough for two efficient models (regression & gradient boosting) at the heart of actor behavior, which do all the heavy lifting (training) before the game is installed on your computer and then use this compressed knowledge (inference) to control decisions of actors in gameplay.

Naturally, these models are embedded into a wider solution that starts off at an unusual place.

Motivation and Goals of Actors



All living organisms have to maintain homeostasis, an internal balance of parameters such as temperature, otherwise, they will die. Peter Sterling and Joseph Eyer proposed that evolution invented brains to switch from reactive to predictive homeostasis (allostasis). After all, organisms cannot react to fatal disruptions - but they can try to predict them. This point of view was picked up in the last decade by the theory of constructed emotion in which Lisa Feldman Barrett posits that human emotions are predictions, not reactions. Instead of mere emotional response to external stimuli, our brains may build internal models of the future and give it a meaning that is perceived, i.a., as emotions. Returning to the example of temperature regulation, we evolved from cells that simply swim away from the cold, into cavemen who can be happy at the end of severe winter, while it's still cold, because we understand seasons and know that soon we'll be embraced by warm spring.

Remarkably, this approach to cognition is inversely mirrored by the critique of AI in games. AI is stupid when it can be easily duped (cheesed) with any ploy to which it will be too late to merely react, when it does not have a sense of self-preservation, cannot predict the consequences of its actions, remains predictable instead of predictive, or does not creatively prepare for the future.

Therefore, actors in Espiocracy are first and foremost allostatic forecasters.

(To be clear, we are not discussing AI of players competing with a human player, to be described in a different dev diary. This one is about solely about actors, autonomous NPC-like entities.)

On the most basic level (lizard brain), actor behavior is guided by three needs and goals:


  • Survival - staying alive or not dissolved
  • Growth - increasing influence (which factors in wealth, number of members, etc.)
  • Impact - changing the world according to ideologies, views, traits, opportunities, etc.



These are precisely and consistently quantifiable parameters. For instance, the need for survival increases when an actor's life is threatened by enemies, diseases, or the possibility of imprisonment followed by execution. The three parameters together (squared and multiplied by personal weights) contribute to the overall level of motivation of the actor. High enough motivation pushes the actor to launch actions that will meet needs and goals which caused motivation to increase. If you see here remnants of a perceptron, you're dead right.

Predictive AI 1: Acting on Needs and Goals



Actions available to actors range from universal (such as fleeing the country) to type-specific (e.g. armed organizations able to raid a place) or even role-specific (a member of government defined in the constitution able to propose launching a war). The first example, running away, is easy to understand in the context of motivation. An actor highly worried about survival may flee the country. Once the actor is away from the threat, the need for survival does indeed decrease. Note that actions do not directly satisfy needs or goals, fleeing didn't give straight +20 to own survival, and instead, it worked through decoupled mechanics that underly the calculation of survival. (This is the critical ingredient that allows the mechanisms described below to work.)

Many actions, however, are more complicated than fight-or-flight response.

In the real life, this is where we would do the thinking - use domain knowledge and an internal model of the world to predict what a particular action would achieve. Generally, AI programmers replicate this process in the code but Espiocracy approaches it already in reconciliation with Sutton's bitter lesson and throws a lot of cheap compute at the problem: data about consequences of actions are collected from many simulation runs (with actions or action combinations paired with corresponding changes of goals and context vector), then these are used to train simple regression models (one per action), which regularly infer predicted values of need-goal satisfaction for every available action.



For the simplest example of action, we're essentially gathering data on how often/much fleeing the country actually saves an actor's life. Things get interesting when we start to compare actions (as a kind of internal model of the world!), for instance in this case an actor fighting for survival may plead for help, attack head-on the perceived threat, or resign from the role. This choice is influenced by availability (closed and well-guarded borders make fleeing much harder), traits (some actors will never flee), personal weights of needs and goals, competence parameter (less competent actors make less optimal decisions), and a small injection of randomness.

Computationally, a lot depends on the context vector and frequency of inference. Currently, these are tied to a regional level (a few countries), which means that action-need predictions are recalculated when, i.a., a war erupts in the region. I would worry more about it (and massage features in the vector or build a tree of models tailored to actor types) if I wouldn't have two other major components of the predictive AI.

Predictive AI 2: Simulating the Future



Our brains can play out not only the consequences of an action - we can also predict what will happen without our interventions. More than simple extrapolation, we can sense dramatic shifts such as the consequences of losing an election.

The game regularly prepares simplified simulations of the future at different levels of detail in four timescales: 2 weeks forward, 2 months, 2 years, and 2 decades. Simulations focus only on the most important events (such as political changes) and approximate their influence on actor goals. Then, individual actors, depending on their influence, competence, position, and access to knowledge can tap into the information about changes to their future needs and goals. This creates lovely emergent motivation, for instance, a political leader anticipating his future loss, and prompted to prioritize growth over impact or even survival before an election.



Of course, the difference between natural prediction and clairvoyant cheating AI depends on the details of implementation. For this reason, simulations are generally about the overt world (e.g. no equivalent of intelligence mechanic from OpenXcom), and "tapping in" slowly grows into a complex algorithm (but it's more interesting to write code about access to information in an intelligence game than about directly scripted behavior!).

Predictive AI 3: Deeper Actions



It's no coincidence that there are three goals and three predictive components. They were aligned in their developmental origin: survival-satisfaction, growth-simulation, and now it's time for impact - deep actions.

Actors intentionally change (impact) the history via actions-target pairs chosen by the second model, trained to spot changes in alternate history (instead of changes to needs and goals). Collected data about actions (enriched by flexible vectorized targets) is paired with influence on State Power Index, both short-term and long-term. In search for directional parameter that widely grasps all the significant events from writing influential books to winning the space race, it turned out that SPI is a robust-enough approximation, that also ties this more complex model (at the moment it's gradient boosting machine) to the logical attempt at making the actors try to improve the position of their country relative to other countries (it's not all roses, subverting another country also increases your SPI).



Not all actors will prioritize this kind of impact due to the weighted nature of needs and goals. Expanding on the tailored approach of all the other shallow actions (which takes into account traits or competence), here the model chooses actions from a list generated by the actor's ideologies, views, past experiences, or friendships and conflicts with other actors.

Final Remarks



After staring into the abyss of predictive AI, in the next dev diary we'll look into other avenues of actor activity (such as reactions and storytelling features) on March 10th.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"Physical concepts are free creations of the human mind, and are not, however they may seem, uniquely determined by the external world. In our endeavor to understand reality we are somewhat like a man trying to understand the mechanism of a closed watch. He sees the face and the moving hands, even hears its ticking, but he has no way to open the case. If he is ingenious he may form some picture of a mechanism which could be responsible for all of the things he observes, but he may never be quite sure his picture is the only one which could explain his observations." - Albert Einstein & Leopold Infeld, 1938

Dev Diary #36 - Worldbuilding 🏗️

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

Worldbuilding is commonly associated with largely fictional worlds (think: Tolkien, Pratchett, or George Lucas) rather than art rooted in historical accuracy. Even in deeper alternate-history scenarios, the world is more of an extrapolation than an invention. Espiocracy, however, walks the path much closer to worldbuilding due to the subject matter (many "alleged" and "classified"), sheer need for details, and requirements posed by the emergent nature of gameplay.

Today we'll explore the ontology of our game world.

As hinted in DD#24, the entire world is built out of entities (a conceptual element of the domain of discourse, or just a fancy word for a thing that is less material than "a thing" and less mathematical than "an element"). These are divided into two main categories: physical objects and mental concepts.


Subject to change and already slightly outdated.

In an implementation closer to colony builders rather than classic strategy games, all entities have parameters, belong to hierarchic categories, are dynamic, can be manipulated, and can interact with other things. Instead of designing strict rulesets with hardcoded units, the game bakes an inherently emergent simulation, where every cog in the machine - every country, player, ideology, city, and so on - can be potentially modified.

All mechanics described in the previous 35 dev diaries utilize this system to some extent. There are even mechanics mostly nailed by sheer relationships between these entities. For instance, an intelligence operation launched by the player exists in the game world as a mental concept, which means that it can be even a subject of a view (eg. guilt after assassinating X), which in turn is a thought that, unless recorded on a medium of thought such as documents, resides only in the mind of a human or a group of people and can perish with death of minds harboring this thought. This is not a special mechanic for generating and then killing guilty operatives, it's natural worldbuilding. The possibilities, also for modding, can be spectacular - technically, it is possible to develop a 1984-ish mod where players can erase entire mental concepts from existence, even countries (as an organization, as a mental concept from the minds of people, and from all the records). Likewise, on the physical side of the entity spectrum, any physical object can be destroyed, up to the hellish mod which can take an advantage of the fact the Moon is also a physical object in the game world. (Kōan: will biblically accurate angels be modded in as physical objects or mental concepts?)

Traits



To illustrate the power of universal entities building the game world, let's take a look at an innocent feature: traits.

Game designers usually pick a single entity (or a few) to be fleshed out by traits. This is a result of their costly implementation and maintenance - that is, costly if you implement entities separately. In Espiocracy, all world entities can get traits and the same traits may be even applied to more than one type of entity because they are implemented on the level of hierarchic categories (and because the code doesn't shy away from the OOP beauty of C#). Here's an example of a city with a set of traits:



"Sea of Rubble" can be applied to any kind of infrastructure - for instance to the economy of a nuked country. To find another example, "Impulsive" can be a trait of any human - an operative, a president, or a witness. Beyond storytelling and modding possibilities, traits can also form the basis of universal decisions, such as rebuilding critical infrastructure or transport networks to remove its "Sea of Rubble" trait.

Gameplay



The universality of entities is reflected by the user interface. Any entity can be selected. A click on a country on the map de facto selects it as an organization, one of the actual entities existing in the world:



After selecting an entity, you get not only details about it (either a standard rundown of details or a designed widget for more important categories such as above), but also hyperlinks to related entities (eg. local events listed above are links to relevant mental concepts), and possible interactions (buttons on the right).

Interactions follow the same principle of emergence. All items can be moved or stolen, all humans can be killed, all thoughts can be disseminated, and so on. Moreover, many of these interactions are enhanced by the rich toolbox of an intelligence agency, meaning that the player can for instance pull off ~20 types of intelligence operations against any human in the game world, from kidnapping all the way to expelling.

New Entities



Entities in the world are initialized historically (more on that in the next section) and spawned during the campaign. At the moment, there are three methods of procedural generation:


  1. New entities are derived from existing entities. A population may create a new actor to act on popular views, sprawling economy may lead to the establishment of a new city, and so on. Entities can also undergo internal-external changes, such as organizations creating branch organizations, a new organization created in a merger, or splitting one entity into a few new entities.
  2. For most important categories, such as actors or countries, there are sublayers - they contain entities nominally belonging to a different category, but with a high potential to be promoted. For example, the "sublayer of actors" contains people and organizations who are not yet (or no longer) influential enough to be actors influencing the country and the world. Usually, when an existing actor is deposed, the vacuum is filled by promoting one of the leading subactors (which creates nice small gameplay around supporting/subverting them to reap benefits later).
  3. Inventing from zero is either achieved via simulation engines (eg. top intelligence operatives created by a separate full simulation or new witnesses spawned as side products of an operational simulation) or, in simpler cases (eg. spy gear), spawned by various mechanics.

Historicity



It is said that a historical game becomes an alt-history game the second it is unpaused. Espiocracy, to pursue more interesting gameplay, takes it one step further and by default engages the engine of alternate history before the game is unpaused.

This is motivated mainly by the huge benefit of hindsight issues in the world of espionage. Take for instance very popular case of Kim Philby - at the start of the game, in 1946, he was a high-ranking member of MI6 and a Soviet spy. Featuring him precisely in this form creates an obvious degenerate strategy for at least two players, a move so obvious that it's a meaningless chore instead of genuine gameplay (British player should always chase Philby, Soviet player should always recall Philby before he's imprisoned).

The solution? Gradual randomization in the form of historicity setting.



10/10 corresponds to Philby in MI6 and all the other entities roughly the same as in history. It is still alternate history (some holes in historical records have to be filled) but players interested in historical accuracy will still be covered. While I believe that this type of gameplay has many disadvantages in the context of espionage, I'm a larger believer in giving players full customization of experience.

Every lower level gradually randomizes locations, dates, types, and entities themselves. This is implemented in a two-fold way - by actual randomization of the initial state and running a simulation of the game world before the start date, longer with a lower historicity level.

Default recommended level will be probably set to 8/10. This is where there is a high-ranking Soviet agent in the West but not Philby and not in MI6. It also corresponds to more scrambled plans of actors in the game world, slightly altered incoming political changes, or modified views, facilitated by approximately two months of pre-game simulation.

Lowering it further starts to build the world in a more verbatim sense - for instance, changing the position of fossil fuel deposits (to the point where Arabian oil ceases to be a hindsight). By elongating pre-start simulation and lifting limits on its course, it may even lead to slightly changed borders or different political processes in place, all while ensuring relative historical plausibility (eg. Germany may start as an already unified neutral state).

Final Remarks



Next dev diary will be posted on February 24th.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"You had to start wondering how the fresh water got in and the sewage got out... World building from the bottom up, to use a happy phrase, is more fruitful than world building from top-down" - Terry Pratchett

Dev Diary #35 - The Map 🗺️

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

Welcome back after holiday break! As the tradition (of 34 installments...) suggests, we'll start with a lighter dev diary: this time, about the map in the map game.

Background Map





Espiocracy implements old school 2.5D approach - player moves the camera in 3D at an angle, but all elements are 2D. In a classic trick, detailed 3D model of Earth was rendered into 248 two-dimensional textures. Not only the computation is done once and for all of the terrain (= better performance, lower requirements, easier development), we also get rather unique relief map of the world at resolution of 43x21 thousand pixels.

From day one, CIA maps were primary inspiration, which contributed to the choice of Robinson projection for the map. In a very topical accident frozen in time, the game actually uses... a CIA variant of Robinson projection, used in The World Factbook, which means that it's probably literally unique game map.

A few examples of zoomed in camera, starting with Indonesian labyrinth:



Korean Peninsula:



The Great Lakes region:



Tasmania:



And here's practical demonstration of the resolution, max zoom into Galápagos Islands:



These are more of an unintended harvest. Relief map remains always in the background and players preferring calm screen can switch to even more old school paper background:



Ultimately, they all serve the king of map types...

Political Map





(This is the political map for the start date of March 5th, 1946. Protectorates and colonies share color with controlling countries. Thin west-facing stripes denote occupation (stripes have color of occupying state or states). Thick east-facing stripes denote territory controlled by subnational militant organization.)

Political map features de facto states. Following statehood criteria of Montevideo Convention...


  1. Permanent population
  2. Defined territory
  3. Government
  4. Capacity to enter into relations with the other states

...and gameplay criteria (every state is a player, has its own intelligence community, set of actors, available international actions etc), enriched by historical foresight, I made the following decisions:


  • Occupation zones - were consolidated where possible (eg. Allied-occupied Austria) or featured as separate states when setting up a conflict (eg. West and East Germany)
  • Ephemeral states around 1946 which were protected by another country - featured (eg. Newfoundland and Labrador)
  • Ephemeral states abandoned by other countries - represented below state level (eg. Second East Turkestan Republic)
  • Participants of civil wars with fluid territory - represented below state level (eg. Viet Minh)
  • De facto states with defined territory, invaded soon after 1946 - featured (eg. Tibet, Oman separated from Muscat, India divided into British India, Travancore, Hyderabad, Bhopal, Jammu and Kashmir, other princely states)
  • Excessive number of small nearby states that acted or will soon act together - consolidated (eg. Trucial States, British West Indies, 500+ princely states except for the four above)

A few closer glances:







While inclusion of states is a careful process, the game includes as many territories, enclaves, and islands as possible in the limited development time. Currently, there are 193 islands in Espiocracy. These provide very palpable geographical approach to the Cold War, from SIGINT installations to Argentina invading the Falklands or USA invading Grenada.

Gameplay



High resolution of the map is not really an aesthetic choice - it is motivated by the gameplay and simulation. Instead of provinces, the world in the game is represented as 5100x2650 grid (with higher precision when needed). Operatives and actors travel in this coordinate system, cities or battles have precise points, rebel or armed conflict territory expands point by point, and most importantly: borders can be drawn in myriad of ways.

To assist alternate history and avoid bordergore, determination of borders (eg. in peace treaty) is supported by database of historical and natural borders. Here's an example of multiple layers of suggested borders in Germany (work in progress):



You can see here Weimar Republic states, administrative units of Nazi Germany, forward positions on V-Day, Anglo-French-American division, mountains, and rivers. The database will slightly evolve over the course of a campaign (eg. less significant & older borders will be forgotten - who remembers V-Day positions in 1995? - while new conquest or rebellions will leave new traces), although lines with the highest weight will remain unchanged (natural borders).

Final Remarks



That was brief, visual, and light as promised. We'll certainly return to the map in the future - perhaps even two times more, since there's a lot more to talk about, from map modes to special hover UI or keyboard-based map traversal.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"One Soviet general, looking at a map of the territory Russia had acquired on the Karelian Isthmus, is said to have remarked: we have won just about enough ground to bury our dead" - William R. Trotter

Dev Diary #34 - Operations 2.0 💥

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

This is probably the most frequently asked question about Espiocracy: is the game more about espionage or more about the Cold War?

Although the or is not exclusive, this question often is asked in a less suggestive way, lined with the fear that it's "just a spy game" instead of a sufficiently complex Cold War grand strategy game. My answer - which did evolve over almost two years of development - is usually along the lines of: it's a game about the Cold War from the perspective of espionage. This point of view, instead of subverting gameplay, enriches it in many fantastic ways and is in my opinion critical step in actually capturing the essence of the Cold War ([1], [2], [3]...).

However, deep down in my heart, I'm fine with Espiocracy being (viewed as) just a spy game. The very best craftsmanship is dedicated to espionage mechanics - to make them stand out on their own, to provide strategic and immersive gameplay like no other game. In today's dev diary, we'll return to that part of the game, exploring the core mechanic of espionage: intelligence operations.

(As always, a "2.0" dev diary is not a patch note, you don't have to be familiar with the previous one. Enjoy!)

The Big Picture



In the full UX flowchart of the game, operations occupy large and central area:



There are currently 8 (!) entry points leading into this world - eight distinct ways to launch an operation, from selecting actors to approving recommendations. By design, it follows a hierarchy of attention: the player can designate just a general operation category (eg. "eliminate X, I don't care how"), choose a particular operation type (eg. "murder would cause too much fuss, X should be expelled"), or go into nitty gritty of tactical approaches (eg. "burn agent Y to distance ourselves from the manufactured evidence").



In the spirit of Wittgenstein, operations in the game are defined by shared properties, not only inside categories but also in general. All operations have a target - influential actors, or any human, organization, or object (which means for instance that you can assassinate a witness, and then silence a witness of the previous witness' assassination). Among other universal properties of operations, all of them use prospective outcome which is a 0-10 score summarizing complex factors in one easily understood number. In the previous dev diary, it was tied to probabilities but this is no longer the case (more on that in the next section), as the current prospective outcome is more of a guidance that is both descriptive (takes into account factors that may become important in the simulation) and causal (influences paths taken by the simulation, especially the final attempt at achieving the objective). Here's the combination of targets, scores, categories, and types in the wild:



Once an operation is launched, it can be handled autonomously by operatives but it (again, by the same design principle) oozes with optional player agency. Available decisions include:


  • Meaningful temporal dynamics - operational pause means staying low for some time and losing the tail, whereas aborting the operation may require a daring escape
  • Reactions - operatives asking the player to choose one of the few approaches, options, spend resources, or resolve issues
  • Calls (example below, note that they aren't fixed and evolve during operations) - modifying the operation, covers, priorities, or choosing A over B in trade-offs



As Mark Rosewater, a veteran designer of Magic the Gathering said: "Be more afraid of boring your players than challenging them!".

Simulations Upon Simulations



Hairy dev diary about simulations already spilled the beans about the new shape of operations. To recap in a more literate manner, every operation spawns its own simulation, characteristic for the category and type, which proceeds step-by-step towards the final attempt at achieving the objective, which is usually resolved by at least one other (sub-)simulation. For instance, a recruitment operation progresses day-by-day through preparation, intelligence gathering, preceding meetings, all the way to the final recruitment pitch which is simulated minute-by-minute (beware, radioactive work-in-progress interface):



Practically, the availability and quality of the operational culmination depend on parameters such as tactical intelligence or trust, so operatives increase them through continuous (eg. surveillance) and discrete (eg. breaking in) actions.

That's it. This simple idea, however, contains the entire universe of emergent simulations - hundreds of possible steps and events, actions depending on anything from operative's traits to carried gear, conversation simulation flowing into car chase simulation flowing into shootout simulation, operation A launching operation B, involvement and interactions between many types of participants (journalists, police officers, or even third-party actors)...

A Game of Information



Espionage is about information - who's who, what's happening, why it happens. Espiocracy tries to capture this angle in many mechanics (such as secrets or coup plots) but one of the most, I have to use this word, brazen implementations lies at the heart of operations.

Sticking with the word "participant" introduced in the previous section (unofficial term, that's just how these variables are called in the code), classic operations have three participants: attacking intelligence agency, target, and defending (counterintelligence) agency. However, participants may not know about each other, identity, motivations, or even about particular actions!



Each participant has the parameter of situational intelligence, increased via actions much like other parameters. Zero means no knowledge of the operation - targets and counterintelligence start with 0. First suspicions or rumors slightly increase it, then passive and active probing, acquisition of evidence or even direct contacts raise it further. As with any other parameter, it can be also changed externally in both directions, for instance leaving a false trace may decrease the intelligence of other participants, whereas poor tradecraft or reckless behavior might up it for others.

The strength of the cover and analogous factors determine how much situational intelligence is required to uncover a particular participant's what, who, and how:


  • What - knowledge about the existence of a participant of a particular type
  • Who - identification of the participant
  • How - methods, objectives, and progress toward them

Furthermore, every action has an inherent requirement for situational intelligence, with half of this number required to see the existence of (blacked out) action at all, and values below that hiding completely the action.

Now, on to much-needed practical examples. Three primary perspectives:


  1. As an attacking agency (eg. you try to recruit the target), you start with minimal but steadily increasing situational intelligence. Logically, you don't need situational intelligence to know the details of your operation but it will be useful in spotting (and reacting to) the actions of the target. Moreover, as the counterintelligence service starts sniffing, the higher the situational intelligence, the faster you'll know they're on to you. Although the "who" level here is irrelevant (usually a country has a single CI agency), it's critical to get to the "how" level and get a look into their progress (race with time on many levels) and objectives (eg. huge difference between interception that may just lead to silent expulsion vs ambush with possible casualties, arrests, long-term loss of operatives, diplomatic scandal, etc). Moreover, the full what-who-how path applies to other participants, for instance, press or police forces getting involved.
  2. As a counterintelligence agency (eg. someone tries to recruit an actor in your country), you start with no knowledge of the operation. Usually, in the course of regular surveillance, you get a wind that something is brewing - an operation category, a target, or an agency, depending on calculated required levels of situational intelligence, which is communicated in appropriate notification. Then, counterintelligence operatives pursuing leads increase the situational intelligence to uncover any of the following: target's what (eg. a political leader), who (eg. actor X), and how (their stance and actions); attacking agency's what (eg. from country Y), who (eg. agency X; may be irrelevant), and how (their objectives, methods, progress, actions); other participants. All of these also directly contribute to available decisions and methods, sometimes like dominoes, for instance discovering the involvement of the press allows the player to pressure them into revealing situational intelligence collected by them which in turn reveals details on other participants.
  3. As a target (eg. someone tries to recruit your operative; the targeted player also controls counterintelligence so you can pull off an operational game with two entities simultaneously), you also start with no knowledge about the operation. Generally, targets remain more or less clueless until the final approach (or until a major slip-up of the attacking agency), during which situational intelligence is immediately boosted above what-who-how levels, with the exception of active covers.

For the sake of readability, I omitted active covers in the examples up to the last sentence. Active cover is false what-who-how which overrides required levels of situational intelligence. It's an expensive approach to an operation, where a participant (usually an attacking agency) can hide under the cover of another why, another who, or even another what such as the press, with the entourage of false actions, false objectives, and decisions (eg. change objective for a false-cover-agency while pursuing another real objective).

Behind The Scenes



► At some point in development, operations were also launchable against any process in the game world but it was a tad too abstract, especially with the activity and what-who-how of participants. The UX option remains ("fund a coup") but mechanically it's always about entities engaged in the process, in this case, funding coup plotters.

► Among other tested & shelved ideas, I temporarily implemented the use of situational intelligence even for operations launched by the player. Instead of inherently knowing what our operatives did, they would first have to communicate that to the player - with the ability to manipulate the communication (a.k.a. lie). This was mainly tested in the context of conversations, where contents would be generally hidden from the player, except for the parts revealed by the operative during debriefing. It turned out to be too much of a balancing & debugging pain in comparison to gameplay gain, at least for now - and redundant to better mechanics that handle operatives going rogue.

► "Infiltration" is not the best word to describe break-ins or wiretaps but alternatives ("penetration", "intrusion") work even worse as nouns and verbs in the UI...

► Operations, in a way, are at the forefront of Espiocracy's game design. They are prone to difficult bugs, degenerate strategies, poor UX, or beautifully collapsing simulations. In some cases they resemble a Rubik's cube - the entire game has to be slightly shifted to solve operational issues. As an example of such a case, early prototypes evoked strong fear of missing out on opportunities to launch interesting operations. This was mitigated not only by the improvement of UX and introducing new features (such as, literally, "opportunity" mechanic) but also by shifting code architecture to allow efficient & automatic & regular calculations for all possible prospective outcomes, both for the human player and for the AI. This in turn, initially created an obvious degenerate strategy (regularly launch all the ops with top scores), so new features and shifts followed here. Then, this strategic complexity proved to be challenging for a standard approach to AI, so I started working on an unusual AI system that can handle such operations. Then... you get the picture.

Final Remarks



Operations will definitely receive "3.0" DD in the future, not only because I'm constantly working on them but also because I still didn't mention quite a few interesting angles (such as operatives traveling on the map, operations with evolving objectives, or post-operational fallout).

The next dev diary will be posted on December 23rd: "Christmas Special".

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"Challenge between intelligent people on both sides" - Aleksander Makowski, a spy who tracked UBL, on what makes intelligence operations thrilling

Dev Diary #33 - National Assets 🏭

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

"Elephant in the room" is one of my favorite English idioms. Game development seems to be filled to the brink with such elephants - important features that should be addressed but were pushed to the side. I've been using this phrase frequently enough to coin the abbreviation "EITR" in the design notes.

After addressing significant EITR two weeks ago (precise gameplay progression), it's time to meet its sister EITR: the economy. This dev diary, however, is not titled The Economy because the system developed to flexibly represent economic factors turned out to be a fantastic framework for a much wider game world. Now, the economy is just one of the 8 sectors of national assets.

Assets in Espiocracy represent infrastructure and objects of national importance. They are passive (non-actors!), exist on the map, provide local effects, can be developed or destroyed, sometimes even stolen. The player, an intelligence agency, has a few modes of interaction with them, but assets primarily are an orchestra in the background, playing a symphony of differences between countries.

Let's jump straight into examples to get the gist of the system.

Examples of Assets



Deposits are the prime type of national asset. There are three types of deposits: fossil fuel, strategic minerals, and uranium ore. Originally (unless the 1946 situation was different), these assets are dormant, located in predetermined areas on the map, and have defined depth/size of 1 to X, relative to other deposits around the world. A state or private entities can invest into upgrading them to extraction facilities, which then enable internal effects such as driving the expansion of civilian infrastructure, and international tools such as an ability to sign trade agreements or enact embargoes.

As a part of mentioned civilian infrastructure, we can look into electricity. It's an asset measured in national coverage from 0% to 100%+, representing popular access to the electric grid (with a surplus over 100 generating international income). Its effects are a not-yet-refined web of influences on other assets and aspects of the game world, including for instance changing the spread of dissent, following the example of North Korea literally keeping people in the dark.

For a more unusual national asset, let's discuss significant works of art. The game features internationally known pieces as physical objects, which are protected, can change hands, or be destroyed. Some of them can be even a matter of diplomatic dispute - for instance, collections of the British Museum. These assets are represented both as concrete named entities (eg. the bust of Nefertiti in Berlin) and in abstract numbers (eg. 2,000 historical paintings). Instead of passive effects, they have intrinsic value (can be stolen by actors, including the player, and sold on the black market), also in terms of the status quo (eg. loss of a significant piece after a break-in can lead to changes in police forces).

Full Landscape



Current full landscape of assets, subject to change:



This system combines in a simple leap quite a few interesting contexts:


  • Postwar damage and theft (eg. many European countries start with severely damaged cities, airports, etc)
  • International control (eg. Czechoslovak and East German uranium deposits are de facto controlled by the USSR)
  • Economic ownership (a subtle attempt at modeling differences between a command economy and capitalism, we'll see how detailed it will be)
  • Development over the course of the 20th century and beyond (eg. electrification)
  • True motivation for destruction (eg. terrorists targeting concrete significant buildings)
  • Famines, shortages, and other crises
  • War targets and spoils of war
  • Counterintelligence of critical infrastructure
  • Actors originating from non-acting sectors (eg. an inventor from strong academia or a political leader from local government structures)
  • Pretty wide modding opportunities

Development of some assets is driven by the population (eg. changes in the city size). Others need a direct investment of the government (eg. new seaport) which is handled by a mass negotiation mechanic: government members, including the player, propose upgrades, developments, rebuilding, and establishment. These propositions make it to a single list, where they are backed by the influence of proposing actors divided by the magnitude of expenses. In alignment with interests and other views, some actors may vouch for expanding housing whereas others may push for funding economic incentives. Top propositions inside the spending scope are then implemented.

Behind The Scenes



► The sheet with asset types includes only somewhat tested and implemented ones. I'm experiment with a few other interesting types such as average kcal intake, riverine transport, or currency strength.

► Technically, national assets evolved from actors. For a long time, I struggled with representing anything close to an economic system based on the very limited number of actors (eg. two top companies in the country). What's worse, these actors didn't meaningfully act, taking the place of more interesting actors. That doesn't mean however that economic entities are completely inactive - they are now represented by more personal actors, such as business leaders, who have more logical & interesting actions, and even expand decision space (eg. business leaders may be subverted by affecting their economic assets).

► The system, in its simplicity, explores an interesting gamedev riddle. Where should we place the boundary between hardcoding and flexibility? The former is much faster to develop (at least in a complex strategy game) but it's not only a matter of making mechanics as flexible as time allows - as I've seen in a few iterations, mechanics can be too flexible, become bland, interchangeable, throw the player into the Euro-gaming pit of the same ten games with slightly different themes. At the moment, national assets are implemented by highly flexible code (modders can basically replace all data points, including all sectors) but for the purposes of interconnected gameplay, it slowly contracts into less flexible form (eg. requiring the transport sector to build transport graph). It's like a live experiment in approximating the most optimal position of hardcoded-flexible boundary.

► Some features were directly inspired by high-quality discussions on our discord server. Thanks, folks!

Final Remarks



Naturally, all national assets can be targeted in intelligence operations such as infiltration, subversion, sabotage, or even cooperation (for instance with foreign underworld!). Moreover, they create a very palpable environment for all indirect actions, where for instance operatives land in a newly built airport, use a reconstructed seaport in a smuggling network, or utilize a denser road network to exfiltrate an agent by car. This will be the topic of the next dev diary - Operations 2.0 on December 9th.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"Germany's war potential should be reduced by elimination and removal of her war industries and the reduction and removal of heavy industrial plants. (...) The plants so to be removed were to be delivered as reparations to the Allies" - J.F. Byrnes, US Secretary of State, 1946

Dev Diary #32 - Intelligence Agencies 2.0 👁️

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

(This dev diary is more dev and more diary than usual)

How do you precisely achieve progress in a game of Cold War intrigue?

Better yet, to invoke a one-liner decorating walls of my office: in a full psychological Cold War intrigue maturely exploring espionage, nuclear strategy, ideologies, politics, and conflicts. How do you measure goals in that, what are the main resources, how do you weave feedback loops, and what's the tick-to-tick strategizing in the game?

This should be probably the topic of the first or the second dev diary. Instead, it was described briefly a year ago in the 8th DD, and then mentioned only between the lines. The reason is simple: elemental progression and basic resources are so fundamental to the game that I was in the middle of the endless cycle of implementations, playtests, and course corrections. Reconnaissance-in-force. We could follow Mozilla versioning scheme and discuss Intelligence Agencies 52.0 instead of 2.0.



The answer, on the surface, is surprisingly simple: as the player in Espiocracy, you're the master of people and funds.



These are further divided into a set of 6-18+ basic resources used by every player.

Money



Espiocracy leans into the plethora of interesting contexts - from origin to legality - around money. While this aspect is kept mathematically simple (make no mistake, it's far from a money-heavy management game!), the game world, much like our real world, essentially revolves around cash.

The player, as an intelligence community of a single country, has a set of contributors who monthly subsidize the intelligence enterprise in exchange for access to intelligence reports. In a typical case, these are Department of Defense, Ministry of Foreign Affairs, and Department of Justice. The extent of funding depends on the departmental budget (stemming from the total state budget which in turn is extrapolated from SPI) multiplied by an unorthodox parameter of "trust and need", separately tracked for every contributor.

SPI (State Power Index) is a purely competitive parameter, increased by overtaking other nations in almost any measurable aspect of the game world, be it quality of the military or shape of the economy. The player has limited indirect influence on SPI (for instance by conducting military or economic espionage) - it's more of an asymmetric landscape between nations than a basic vehicle of progression.

In contrast, trust and need are directly controlled by the player. Trust, naturally, is gained through operational successes and lost after failures. Stealing blueprints of strategic weapons increases the trust of military circles, whereas failure to prevent a terrorist attack decreases trust across the board. Here's also where things get interesting - the same parameter tracks also the need for intelligence. Terrorist attacks definitely increase the need, as do regional wars, international tension, or hostile activities. By combining these two aspects into the same coin, Espiocracy explores the uneasy inflection point between real fear and fear-mongering, between failing upwards and making yourself obsolete by being too good. This paradox was the bane of worldwide intelligence funding which peaked around 1989 and was dramatically slashed just a few years later, rendering many intelligence professionals no longer needed... Find what you love and let it kill you.

Contributions, counted in millions of dollars (usually with an accuracy of $0.1M), are divided into three pools: operational, restricted, and illicit. An operational account accumulates the main legal resource - money that can be spent on expansion, improvements, agents, bribes, special operations, and so on. Restricted funds are dedicated to particular areas, for instance American player receives restricted funds from the Department of Justice which can be spent only on the expansion of the FBI. Illicit money comes from breaking the law on the ground, shady contributors, and covert governmental programs along the lines of Iran-Contra. The last kind of pool can be spent only on already covert activities (eg. bribes), more overt expenses (such as hiring staff) first require laundering illicit funds into an operational account.

At the heart of spending money in Espiocracy sits a radical solution: upkeep is abstracted away, all expenses are one-time expenses. Players don't babysit monthly changes in account balance because there is no maintenance cost. Instead of worrying about salaries, you spend money on a hiring campaign that brings in X new operatives. Lore-wise, salaries and other upkeep costs are handled by contributors (you're a part of state apparatus, not a business, after all) but fuzzy explanations aside, it makes for very fluent gameplay with swift feedback loops, skipping straight to the fun, and moving anti-snowballing mechanics into the vicinity of competitive challenges (eg. more operatives means larger attack surface for foreign infiltration).

Speaking of which, contributors form a kind of contributor economy which takes the role of (also) a negative feedback loop, traditionally implemented by upkeep costs. Symmetrically to large successes rewarded with an injection of money, large failures may require covering the damages (eg. of a diplomatic incident). Further significant loss of trust and need leads also to discrete "downsizing" events, where the player has to single out scapegoats, cut down the staff and sprawl in general, to regain the trust. If that fails (or the loss of trust is dramatic), it may lead to the reform (large changes in the structure of the intelligence community, along with purges and downsizing in general), or even loss of contributors. Changes in the composition of contributors can also happen along political changes - for instance authoritarian one-party systems may feature The Party as the main contributor, some totalitarian countries love overarching Ministries of Internal Affairs that heavily depend on the intelligence community, and small democratic states may almost completely do not care about intelligence, leaving it to a single governmental body such as President's Office.

Staff



People form the second half of resources in the game. Almost all tasks are implemented directly by the staff. You can get by (temporarily) without money but falling to 0 operatives is a game-over condition.

The bulk of staff consists of regular operatives - working mechanically as a currency with internal dynamics. Regular operatives are divided into agencies (eg. for British player there are three separate pools of regular operatives: MI6, MI5, GCHQ), hired with funds, and then (somewhat cynically) thrown in numbers at issues, operations, expansion, and other actions. Each pool is characterized by an average tradecraft level which is increased by training, improvements, engagements on the ground, cooperation with more skillful players, and allows classic quantity vs quality decisions. In addition, regular operatives have limited but impactful office life that includes spontaneous factions forming around views and ideologies, even up to said faction potentially refusing actions, pressing demands, going rogue, or defecting.

Beyond regular intelligence officers, players develop specialized operatives in cycles similar to classic technology trees of other strategy games, with the addition of irregular mandatory investments. Currently (subject to change) there are 12 capabilities - optional specializations:


  • Social Engineering
  • Politics and Diplomacy
  • Science and Technology
  • Business and Economy
  • Media and Culture
  • Digital Devices
  • Guerrilla Warfare
  • Military
  • Direct Combat
  • Criminal Investigations
  • Philosophy
  • Deep State

They are tied to many contexts in the game world: directly contributing to operations (eg. securing better evidence for espionage trial), unlocking available structures and tools (eg. paramilitary training camps tied to guerrilla warfare), influencing events encountered by the player (eg. leaning more into politics or more into military), feeding into asymmetric positions (eg. British player starting with highly developed direct combat thanks to commando experiences in WW2), mirroring the population (eg. less literate countries having a hard time expanding more sophisticated capabilities), and so on.

And then we have top operatives who already received larger separate dev diary. In this, close to the final, iteration of basic resources, top operatives are slightly more impactful operatives who can be both proficient at tradecraft and specialized in a few capabilities. They are definitely not hero units, their main role still belongs to the storytelling layer, but they are embedded in the progression with rather an unconventional mix of mechanics. Instead of the standard choose one out of three random character cards known from many other strategy games involving characters, new operatives are created by the player from a set of positive and negative traits that use a pool of points, not far from character creation in C:DDA. You can increase the number of available points by choosing an alcoholism trait and spending the excess on higher specific skills - or invent a candidate less skilled at the moment but having cheap large potential for the future. As with all other resources, these points will be tied to local contexts and the game world, namely by different weights of the traits. Although it is a departure from the usual realism-first approach, this mode of player agency and flavorful strategic decisions that influence the next decades of storytelling is too good to not feature in the game.

Behind The Scenes



► Implemented, tested, and dropped ideas included various mana pools (from political influence to approvals in blanco), realistic fiscal years (yearly popup with budget negotiation, yay), worktime of operatives as the primary currency (sort of action points but in real-time), full bookkeeping experience along the lines of Football Manager, and even RPG-like progression in levels from 1 to 100 based on Fallout: New Vegas. Some were bad, some were acceptable, and some contributed features or themes to the current system.

► What about intelligence? Is there an information economy? Yes, it exists but not globally - it has ephemeral, local, discrete value. Experiments on resources included many different approaches to the quantification of intelligence, from counting the number of produced reports to chasing numerical requirements posed by the government, but they all reduced the game to euro-gamish manager of an intelligence mill (and as a bonus, were biased, confusing, and too often broke immersion). In later iterations, I consciously replaced quantity of intelligence with quality. It's a wider question of what this game is about and the answer was never about production chains or chasing green numbers. A smaller or larger number of infiltrated actors doesn't matter when you rewrite history by stealing Khruschev's "Secret Speech", procuring uranium for your nuclear program, and pulling off a coup d'etat on your eternal enemy.

► Note on the realism: IRL state funding of intelligence agencies is diverse, murky, and full of contradictions. Aside from the riddle of representing state funding at all in a game (which is somewhat immersively solved by the simple equation of SPI x Trust and Need), there's an entire ordeal of policies, authorizations, approved items, programs, oversight, competition between departments, red tape, and so on. Some of that made to a game in the form of contributors but I cut off most of these to avoid developing a bureaucracy simulator. Yes, in some parts of the modern world spending money without all these points is a big no-no (until you scroll to the "Controversies" section on Wikipedia), but I'm not too subtle about players playing less as 2022 state enterprises and more as the middle of the Cold War, "we lost accounting books and this sum was spent to weed out traitors who tried to sabotage moon landing", espiocracies!

Final Remarks



Next up, National Assets on November 25th.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"Victor spent the money, mostly in West Germany, to bolster labor unions there. He tried undercover techniques to keep me from finding out how he spent it. But I had my own undercover techniques" - Thomas W. Braden, 1967

Dev Diary #31 - Biological & Chemical Weapons 🦠

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

Biological and chemical weapons (BCW) are sometimes called poor man's atom bomb. According to a comparative analysis, BCW can inflict similar casualties as a nuclear bomb at 1/800 cost per square kilometer. This crude calculus pushed unorthodox nations - Canada, Rhodesia, Iraq - to develop their own programs and devise insane plans, such as Chile poisoning the water supply of Buenos Aires in case of an Argentinian invasion.

BCW integrate surprisingly many walks of geopolitical life - military, diplomacy, treaties, and political opinions. Usually, they are handled also more or less covertly and near intelligence agencies. Espiocracy utilizes the unusual player persona, an intelligence community, to allow direct engagement with BCW in the game world:



Their development will be one of the viable strategies for some countries and situations. Their existence, a forgotten threat that was taken seriously during the Cold War. Their cruelty, known but not condemned until treaties of the 70s and 90s arrived. Their proliferation, always problematic for both state and non-state actors up to the modern times.

Postwar Stockpiles and Progress



WW2 has seen the production of BCW in enormous quantities. The game, starting in 1946, will feature these stockpiles as standard world entities on the map - they can be found, moved, stolen, used, or destroyed.

Most of these are already protected by the military and, following the history, soon to be destroyed (by dumping them in the sea). However, their proliferation can become an issue right at the start of the game, with some players even starting the game with active counterintelligence operations. Numerous armed organizations can try to solicit BCW and use them in devastating attacks, with the prime example of Nakam's operation to poison a camp for German prisoners of war in April 1946, which can be intercepted by American intelligence community operating in the occupied zone. (Starting historical positions can be randomized in the initial configuration, allowing the player to avoid the benefit of modern hindsight. Here, gradual randomization can change positions and size of stockpiles, the timing of Nakam operation, target, extent, or even various chances of dropping it and/or replacing it with a different operation.)

In a slight stretch of history, player's intelligence agency is responsible for the further eventual development of new BCW. As suggested by the screenshot, BCW reuse spy gear mechanics (in the meantime spy gear evolved into a more general inventory-like system):


  • Modeled weapons include mustard gas, tabun, sarin, novichok, ricin, botulinum, anthrax
  • Availability depends on developed capabilities (skill-like parameters and specialized staff of player's intelligence community)
  • Development program requires budget, staff, and time - to research, test, create strategic materials such as blueprints, and establish production lines; after the initial phase, stockpile can be produced at much lower costs
  • Engagement with BCW universally constitutes a secret (breach of policies/ethics/etc by the player that has to be protected, actively solicited by other players/journalists/actors, causing backlash if revealed), more severe late in the game when counterproliferation treaties are signed
  • Blueprints and stockpiles can be used not only on the ground (next section) but also as a currency, following the historical case of British services trading VX chemical weapon for US thermonuclear blueprints


Use of Biological and Chemical Weapons



BCW slightly expand player agency in intelligence operations. Minimal quantities of stockpiled agents can be used during assassinations, with the classic example of an almost perfect crime utilizing ricin-tipped umbrella. However, the cost of development is still substantial and these operations on their own would hardly justify it as a viable strategic choice.

The main potential use of BCW lies in military operations - especially in defensive plans. BCW are one more building block of the stalemate in the Cold War, prompting the other side to always take into account possible biological and chemical retaliation. Even before 1946, the UK already developed plans to "use sprayed mustard gas on the beaches" in case of an invasion The following decades have seen similar plans, even among the superpowers, with the primary example of the Soviet Union developing robust chemical and biological programs as an important part of deterrence. Actual use of BCW in the game world follows a no-nonsense approach similar to nuclear weapons, where all living entities - operatives, actors, and population - in the targeted areas are directly affected.


Cold War madness: warhead carrying 356 bomblets, each with 500g of sarin. Median lethal dose for a human being is close to 1g.

BCW can also make it to the hands of terrorists. As the staple of the late-game challenges, terrorism will be described in an extensive dev diary in the future - here, it's worth mentioning that from the diplomatic POV, significant terrorist attack utilizing BCW can push the world to rapid counterproliferation actions.

Speaking of which, game world starts with poorly enforced Geneva Protocol from 1925 - prohibition of chemical and biological warfare. The UN and politicians over decades will tend towards proposing a treaty that prohibits not only warfare but also the production of BCW (IRL 1970s), and then further extension to establishing a new special actor for proper enforcement, possibly extended also to destruction of extensive stockpiles (IRL 2000s). Players can try to evade these prohibitions by more extensive counterintelligence protection, infiltrating the actor (as did Russia a few years ago), limiting the actual use of BCW, and other tools of espionage.

Final Remarks



The next few dev diaries will revisit some of the previously described (already year old!) features near the core gameplay. We'll start with Intelligence Agencies 2.0 - to be posted on November 11th.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"Forms of chemical and allied warfare are more humane than existing weapons. For example, certain types of 'psychochemicals' would make it possible to paralyze temporarily entire population centers without damage to homes and other structures" - U.S. Department of Defense in the 1950s

Dev Diary #30 - Nuclear Brinkmanship ☢️

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

To paraphrase Fightclub, we meet at a very strange time in world history. This developer diary yearns for "a work of fiction" disclaimer. For all escapism offered by the Cold War, current threats undoubtedly taint the design of Espiocracy and will shape your reception of the game. It is certainly a work of its time.

Stuart Brown eloquently argues in a fantastic essay that video games as a whole are a work of the Cold War times - "an unintended harvest, a nuclear fruit". From the development of game theory, wider rollout of military wargaming, all the way to the progress in computing, simulations, or networks, the work on weapons of mass destruction was always uncomfortably close to gaming.

It is striking, then, that no video game explores nuclear brinkmanship in depth. A few existing attempts either hand the player a nuclear bomb as an inconsequential eraser tool or reduce sabre rattling into a simple board-game-like race with a doomsday clock. During the period of extensive research & prototyping, I almost fell into the same pit, likely for the same reasons as previous developers. When you peer behind the curtain of global fears and look at scientific details, calculations, tests, and usefulness, you can almost feel... disappointment!

Actually deployed warheads had considerably lower yields than weapons from movies and books, simulated damage and casualties were not far from WW2 strategic bombing, radiation is Pandora's box of popular incorrect assumptions, and nuclear winter has a shaky basis. Modern historians even argue that the incineration of Hiroshima and Nagasaki played merely minor role in the Japanese surrender. Academic books are full of similar findings that downplay nuclear weapons. Their implementation at face value inevitably has to trivialize (already virtual!) nuclear bombs - and what's the point of brinkmanship if you're not afraid of the brink?

Espiocracy has ambition to be the first game that renders the highest kind of justice to nuclear brinkmanship. We follow the words of Janne M. Korhonen: atom bombs are fundamentally psychological weapons. The game will focus less on the scientific modeling of explosions, and more on the exploration of human psychology confronted by constant existential threat. This is, after all, a work of fiction.

Psychological Conflict



We start our tour de force of design with Herman Kahn. In the 1960s he published the famous escalation ladder:



Yes, it's rather unrealistic but the entire long paper features many bright observations. The game builds on them and the ladder itself to create an intelligible backbone of otherwise immensely complex psychological conflict:



Every country in the game world has at least two positions (!) on the ladder. There is a real position, usually known to the leader(s) responsible for nuclear weapons in the country, and then there is externally perceived (probable) position, known to other leaders, actors, and entire populations, set by the combination of threats, statements, credibility, evidence, including also actions of other players. In rare cases, other nations may be privy to the third, secret perception that follows special insight or agreements.

Following Kahn's ladder, steps are not meant to be followed one by one, and instead, merely present possible options of escalation or de-escalation from the current position. Steps are by design very different, some acting as one-time events (a threat is forgotten if not repeated after some time) whereas others serve as default fallback points (past tense and infinitives, eg. after a nuclear test a country returns to expanding stockpile). Admittedly, a ladder is not the best analogy (but it sounds nice and has historical weight). A better analogy can be found near poker chips - as a player, you can bet any amount equal to or higher than bets of other players, you can refuse to bet, you may be forced to bet blindly, and over time you may acquire more chips and therefore be able to place higher bets. Most importantly, during the cycles of bidding you build mental models of other players, and get to know their modus operandi, level of aggression, acceptable risks, limits, bluffs, and mistakes.

Directly understood nuclear brinkmanship happens between real and perceived positions. Play truthfully to establish credibility. Use credibility to bluff. Downplay escalation to surprise the opponent. Decipher the real positions of other players. Beat the drums of war by exaggerating the perceived position of the enemy.

Real Proliferation and Preparation



Distance between positions on the ladder is limited by logical constraints. It's impossible to wage nuclear threats without any real work on the nuclear arsenal - or to threaten with global thermonuclear war with a stockpile of five warheads. Beyond constraints, a larger distance is harder to establish and defend. Completely noncredible threats at best may be ignored and at worst laughed off, leading to the demise of a warmonger's political career.

The real position remains the bedrock of nuclear brinkmanship.

The economy here is clear, brutal, and realistic. Advancing real nuclear posture is always costly, it requires much more effort than advancing perceived posture. Real progress relies on expenditure combined with previously introduced mechanics and corresponding modes of interaction:


  • National interests and views motivate the country and actors to pursue a particular level of preparation (also in the context of other countries, especially when countering main opponents)
  • Scientific and technological progress is achieved in Big Science projects supported by local influential actors, including the important role of global progression from clunky atom bombs ("WW2 with nukes") to MIRVs (full mutually assured destruction)
  • Uranium is procured as one of the strategic materials, with the optional role of other materials such as stolen nuclear blueprints
  • Governments assign funds for further expansion of stockpile and strategic delivery systems, decide about deployments and escalation/de-escalation in general

In addition to developing nuclear capabilities, nations can influence the real nuclear posture of other nations - with the prime example of non-proliferation efforts (treaties, inspections, anti-nuclear social movements, or even sabotage - historically Eisenhower considered sabotaging the French nuclear program). Indirectly, it also takes the form of (generally) nonescalatory preparation of warning systems, blast shelters, civil defense, and nuclear-proofing state institutions. On the other side of the spectrum, nuclear-capable nations can weigh in for their allies (eg. USA considering tactical nuclear bombing in Indochina to rescue encircled French units) or even be asked for nuclear assistance (eg. Mao asking Khrushchev to provide atom bombs for the invasion of Taiwan).

Perception of Nuclear Posture



The most straightforward case of perception aligned with reality is simple only in theory. Change of posture has to be officially communicated which often sparks the reaction of the population (eg. protests), actors (eg. strong opposing voices), and nations (eg. escalation in response to escalation).

In the short term, it may be easier to downplay own nuclear position. Lack of any public communication and counterintelligence protection may be enough for some time but later will require special actions, costs, and possibly shortening the distance between real and perceived posture. The most famous nuclear scare of the Cold War - the Cuban Missile Crisis - falls exactly into this bracket. Soviet Union covertly deployed missiles near the USA with the intent to later present this as fait accompli (keeping perceived position far from real posture for some time). However, American intelligence community discovered the deployment, politicians contacted the Soviet side who denied the change in posture, services gathered more evidence, government debated on the response, and then in alignment with the conventional and nuclear-adjacent response, President Kennedy communicated the discovery of deception in dramatic televised speech. The crisis was resolved when the American side agreed to scale back nuclear deployment from Turkey and Italy - a move which, curiously enough, was also secret. Both the origin and course of this crisis will be emergently simulated in the game.

Classic brinkmanship of the Cold War usually relied on the opposite approach - rhetorical escalation beyond real assumed position. Up to 1962, virtually all presidents of the two superpowers employed these threats regularly with mixed results. From Truman exaggerating nuclear stockpile in talks with the not-yet-nuclear USSR to Khrushchev bluffing to strike the West over Berlin blockade, threats were met with individually different responses, and this is also the approach taken by the game - in addition to player's input, actors themselves will decide about the response to escalatory rhetoric. It's also worth mentioning that various moves and accidents can also escalate the tension without direct intent of any of the sides, with the primary example of the IRL events from the year 1983 (Operation RYAN, shoot down of a Korean airliner, ordinary NATO exercise, Petrov accident, misunderstood speeches, diseases of elderly Soviet leaders - truly explosive combination).

Third-party interference can take an unusual shape in the area of perception. It's no coincidence that acquisition or even sheer attempt to acquire nuclear weapons is regarded as an escalation - manufacturing evidence of such a position can be a firm casus belli. On the other side of the aisle, society also contributes to the perception: books and movies can popularize a particular country as a nuclear villain, widespread drills and shelters can instill in the population a perception of higher threat than real. In very rare but possible cases, society can even enter a state of mass panic and riots after perceiving particularly severe escalation - that was for instance the fear that caused the British government to block TV broadcasts of "The War Game" (1966).

Globally, the highest escalatory position reached by any country ever sets the bar for nuclear taboo. Breaking it usually leads, on the one hand, to international outcry and possibly even coalitions formed against the first mover. On the other hand, the world gets accustomed to this new level and others may be tempted to follow the steps if the original party maintained the stance and/or was not severely punished.

Nuclear Blasts



Bulk of psychology aside, nuclear weapons in Espiocracy are a real existential danger to all entities in the game world. Nukes should and will supply players with a sense of paranoia, up to the point of losing the game in the case of the death of all intelligence operatives. In addition to nuclear brinkmanship, you can turn on a realistic game rule that enables nuclear accidents akin to Stanislav Petrov case from 1983, ready to derail the game on every single tick of full MAD readiness.

Preparation for nuclear war features a special on-map mechanic: you are responsible for nuclear plans. This includes the choice of precise escalatory step (from demonstration strike to global strikes), timing, warheads, targets, and their saturation. For a bleak flavor, other actors will sometimes weigh-in to amend the plans - as in the case of Kennedy who removed Warsaw from the list of cities to nuke out of private sympathy.

This is also a good moment to explore - in brief - strategic weapon types and delivery systems. Their details are covered by the scientific-technological mechanics but from the perspective of player agency, the game simulates large changes that may be not obvious to the modern audience. In the early decades of the Cold War, bombs are delivered only (and then still primarily) by bombers which take hours to scramble and then hours to arrive at the target, taking high losses on the way. Nuclear plans of the first decades called even for a few weeks of rolling nuclear bombings, a type of war never really depicted in any popular media. After the first 15-25 years, this evolves into a more familiar form of nuclear warfare employed by ballistic missiles. Severe mutually assured destruction arrives relatively late, initially with submarine-based missiles (which are universally hard to disable before the retaliatory strike, unless they are tailed underwater) and fully with MIRVs (multiple independently targetable reentry vehicles which feature multiple warheads per missile launched into space).

Tactical weapons, understood as weapons used to win battles instead of crippling entire countries, can be produced in mass numbers and can densely saturate deployed military forces, as was the historic case for Europe. Their use, however... is tricky. From the military perspective, it's not an eraser tool - real plans called for insane density of usage (eg. 136 tactical nukes on 100 km front in the 1977 plan) to achieve measurable results. In the spirit of alternate history, the player will be able to pull this off but the main intended role of tactical weapons in the game is centered around a flavorful menagerie of weapon types: nuclear mines, torpedoes, anti-aircraft rockets, or even Davy Crocketts!

Once the escalation reaches the highest levels and the world veers into launching nuclear strikes, the game takes a no-nonsense approach to the representation of the brief conflict, focusing on interesting points of historical divergence: actors taking direct responsibility for giving an order to strike, possible mutinies along the way, first strike wave and retaliatory second strike, along with the long-term spectre of eventual doomsday devices such as dead hand, dormant submarines, and stationary dirty bombs.

The adventure doesn't end here, at least not yet. Destruction takes various forms and affects all physical objects in the game, from infrastructure to people, through direct incineration in the blast, crumbling buildings, EMP (with different influence on older and more modern devices), flash burns, the spread of radioactive fallout, radiation sickness, entire states collapsing under the weight of casualties, nuclear-free continents preparing for nuclear winter...

Behind The Scenes



► The first dev diary clearly rejected doomsday clocks. Hopefully, you can now understand the reason - a single global counter would not only significantly limit psychological exploration of the subject, but it would also reduce the role of unreliable intelligence, local contexts, readiness as a tool of its own, and even rob willing players of the real feeling of paranoia due to accidents looming over the world regardless of DEFCON level.

► Among the most interesting-disappointing controversies, nuclear winters occupy the top place. It's a very hairy story about human minds (which will serve as a small inspiration for an event or two in the game). In short, the notion of nuclear winter originated in the 80s from very early and simple simulations of soot from burning cities, with results highly hinging on a few numerical constants. Scientists, riding the wave of the 1983 nuclear scare, huge movies such as "The Day After", and nuclear disarmament talks, saw this as an opportunity to pursue noble anti-nuclear activism and they more or less succeeded, with the help of celebrities such as Carl Sagan. The world indeed believed that the Earth will freeze to death due to soot blocking the sunlight. Later real-world events (such as burning oil wells during the Gulf War) and more precise modeling never fully confirmed these warnings. The latest, most advanced modeling attempts produce rather timid results - 100 cities destroyed by nuclear bombs would simply cancel global warming, lowering global temperature just by 1°C. Even an enormous exchange of 400 MT would cause a decrease in global average temperature by 8°C for a decade, after which temperatures would return to normal... Notably, just two months ago Nature published detailed study that essentially dropped the term "nuclear winter" and instead focused on global famine (which still did not reach some parts of the world, such as Australia, even in the worst case scenarios).

► Nuclear weapons sit at the very heart of the inspiration behind the development of Espiocracy. In addition to mentioned Nuclear Fruit by Ahoy, I always find plenty of interesting takes in Fail Safe from 1964 (IMO the best movie about and from the Cold War), an indie movie by Ben Marking, and obviously classic Dr. Strangelove, always present in subtitles of the diaries.

Final Remarks



Nuclear and adjacent UI is in the middle of reworks, hence no screenshots.

Next up, we'll continue the topic of weapons of mass destruction: Biological and Chemical Weapons in two weeks.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"Cold War kids were hard to kill
Under their desks in an air raid drill"

Billy Joel

Dev Diary #29 - Conventional Wars 🪖

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

Espiocracy is not a wargame. Conventional conflicts follow the KISS principle and are reducible to one sentence: free-moving NATO counters fighting in simulated battles. Design focus, as always, is closer to the unconventional side of the world - Espiocracy is (partially) a special forces game!

Modern special operation forces (SOF) were forged in the fire of WW2, right before the start date of the game. In a true homage to SOE commandos, OSS paramilitary camps, CIA green berets, and many later units, you will be able to pull off famous special operations from WW2 and beyond - parachute deep behind enemy lines, blow up critical targets, pave the way for routes of invasion, or disable dangerous capabilities of the enemy - during conventional conflicts.

Military Forces



The player controls special branch of local military forces. Other branches usually include land army, air force, and navy. Each of them is characterized by:


  • Number of active duty soldiers
  • Number of reserve soldiers, with ability to mobilize them in case of conflict
  • Condition of an average soldier (includes training, small equipment, readiness, experience etc)
  • Heavy equipment (tanks, helicopters, fighters, carriers etc)
  • Quality of command, control, and logistics
  • Level of corruption

Branches are funded from the state budget, changed by initiatives of significant actors (even to the point of favoring branches, eg. Eisenhower advocating for strong air force), and external context (such as technological paradigms or regional instability). In the event of war, branches are generally combined and fight under highest local denominator - brigade, division, corps, or army.

Before a War



Every country maintains a set of war plans. Their existence and details follow national interests, webs of alliances, state of military, temporary opportunities, and sometimes even personal grudges of leading actors. At the very least, there are defensive war plans which contain largely standard data (such as C&C, bases and their protection, defense lines, useful retreat and counterattack paths) and their main value lies in protection/stealing. Offensive war plans, on the other hand, are highly prized materials, prepared both "just in case" and before real operation, which - when captured by the defending side - can decide about the fate of war.


One of the inspirations behind war plans in the game

Players take part in unconventional planning before real wars - on the level of special forces and nuclear targeting (next dev diary). Utilizing player agency slightly larger than real life, other branches generally follow opportunities established by the player. For instance, special forces breaching particular part of border will be followed by conventional forces, sabotage on particular direction will be assisted by air assaults, strategic reconnaissance and its results will guide movement of armies, and so on.

Course of a War



After a war is declared or border skirmishes evolve into larger conflict, the war relies on two strategic halves. Belligerents compete for strategic targets on the ground: cities, airports, railway junctions, sea ports, and high value actors such a head of state. They are defended, conquered, denied (by encirclement, strategic bombing... or nukes), and then used to enable strategic movement which generally means offensives and counteroffensives (and lack of movement - holding the line), naturally leading to direct simulated battles.


Rapid offensives and counteroffensives of the Korean War

Inspired by highly mobile warfare of Korean War, Operation Desert Storm, and Seven Days to the River Rhine, combined units swiftly cover larger swaths of terrain both when pursuing the enemy and when retreating. Actions are dependent on the state of military branches (which can significantly change during the conflict) and terrain details (to, i.a., approximate strategic role of the Fulda Gap).

After initial (planned) special operations are carried out, the player is able to react on the battlefield near both described halves. You can conduct raids on strategic targets, rescue protected strategic assets (from hostage situations to easing encirclement), harass movement via ambushes and sabotage, enable new opportunities, train local guerrilla forces, and so on.

There's no war score, only a natural competition for targets and means to conquer/defend targets. All sides usually maintain communication channels which are used for small agreements such as temporary ceasefires or exchanges of POWs, which pave the way for deeper negotiations and eventual final peace deal. Third party countries often exert pressure on belligerents and may attempt to resolve situation with tools such as UN peacekeeping forces. Actors inside involved countries not only do not pause activities but sometimes even see conventional wars as an opportunity to climb the ladder - for instance via coup against government which poorly handles unpopular war.

Last but not least, every conventional war is a boon for military intelligence. From interrogations to captured equipment, all participants acquire vast knowledge about the enemy, actors, technology. At the same time, other agencies may infiltrate conflicts to acquire at least part of the treasure trove.

Alternate Approaches



Rich history of military conflicts and their representation in games (also in the professional wargaming context) supplies many possible takes. The topic of military intelligence alone is vast and deserves many espionage-focused games. Espiocracy chose SOF angle - what were the other considered options?


  • False intelligence game, following the likes of WW2 deception (Operation Fortitude!)
  • Donald Nichols simulator, a man who built his private empire of targets, bribes, and spies in every unit during the Korean War - it's impossible to summarize his biography in one paragraph, so here's a taste: when his enemies dispatched an assassin to kill him, he was informed about the plot by his vast network of sources, murdered the perp, and then buried the body near his office as a warning for future plotters
  • Embedded military intelligence units, deciphering precise movements, incoming attacks, working out tactical and operational layer of a war, creating and resolving fog of war
  • Psyops side of the war, heavy-handed war-time propaganda, encouraging surrenders and defection, motivating own soldiers
  • War room with constantly incoming intelligence with various levels of uncertainty that is then used to make decisions on the battlefield

Many of them were a source of precious inspirations and are featured in (very) limited form.

Final Remarks



The next dev diary will progress from conventional to nuclear wars.

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"Weakness and irresolution unavoidably lead to war" - Odd Arne Westad

Dev Diary #28 - Governments & National Interests ♟️

What's happening / TLDR: Developer diaries introduce details of Espiocracy - Cold War strategy game in which you play as an intelligence agency. You can catch up with the most important dev diary (The Vision) and find out more on Steam page.

---

John Lewis Gaddis cleverly compared the Cold War to the Peloponnesian War. Grand strategic stalemates, he wrote, dominated statecraft of both conflicts. Individual victories and defeats were irrelevant in the face of larger attempts to break the stalemate, put the enemy in an unfavorable position, and subdue the opponent in the long term.

This observation not only fits the scarcity of hot wars in the Cold War - but it also aptly characterizes a few conventional conflicts that did erupt during the period. Rather than wars of tactical opportunity, they were almost exclusively total wars of destruction and survival. There was nothing subtle in Korean War, Arab-Israeli Wars, or Operation Desert Storm. Naturally, this level of gravitas requires special decision process behind these rare but important ends of modern foreign policy.

This dev diary explores some parts of the what, how, and why behind grand strategic decision-making of Espiocracy. Wars, in one sentence, are declared to pursue or protect national interests.

Governments



Player persona different than a nation or a nation spirit opens entire fascinating avenues of politics that can expand the grandeur of grand strategy gameplay beyond usual approaches. Here, a government is not a single-minded entity - it is a group of influential actors, including the player, which jointly makes grand strategic decisions.

In a rabbit hole of sorts:


  • Actors are appointed to precise governmental bodies (such as two chambers of legislature)
  • Governmental bodies set legal powers of residing actors in the decision-making process
  • Bodies, legal powers, and appointments are defined by the constitution and electoral law
  • Constitution and laws can be crafted, amended, and changed by appropriate bodies


(Dot chart doesn't work yet.) In this case, after the election, parties will try to form coalition government, appoint prime minister (probably Petr Zenkl from victorious CSNS), divide cabinet positions, and start working on a new constitution since Czechoslovakia in 1946 has more or less unregulated constitutional situation. In the real life, communist KSC won the elections, Gottwald became prime minister, and then the government worked - with a coup along the way - to craft communist constitution. Alternate history right there, just 2 months in!


It's not exactly correct, still needs work on historical accuracy. Sham elections in the USSR do happen in the game though and can be somewhat relevant for internal factions of the communist party.

This level of detail gives voice to political leaders, cabinet members, political parties, military leaders, and naturally the player. Legal powers at the moment include the ability to propose an action (such as a declaration of war), and then down the line approve, reject, or veto. Ideally, the game will follow roughly realistic paths where for instance members of a political party sponsor a bill, which is then voted in parliament chambers and has to be signed by the president (whose veto may be rejected by a significant majority in the parliament). Granularity is defined in the context of precise actions - establishment of an embargo may follow a different path than signing a strategic treaty.

Legal back and forth is supplied by an unlimited amount of politicking. Actors can meet, convince each other, exchange favors, provide evidence, exert pressure, threaten, and so on. In especially important cases, such as joining NATO or declaring wars, a covert meeting takes place, where the most influential members of the government (including the player) jointly decide about the future of the nation.

National Interests



After exploring what and how, we need the why to complete the picture.

Populations and all actors profess views - mental stances towards subjects, for instance, "fear of nuclear war". National interest is a special form of a view, narrowed down to a single stance ("focus on"), common for many actors and usually for the entire country.

Examples include:


  • Acquiring nuclear weapons
  • Rebuilding country after war
  • "Supporting free peoples of the world"
  • Opening foreign markets
  • Promoting human rights
  • Preventing the emergence of hostile major powers or failed states
  • Controlling neighboring countries
  • Preserving neutrality
  • Protecting own citizens abroad
  • Survival of the nation (in terminal cases, often near hot wars)

National interests mark n-th evolution of various foci, threats, and mission trees that were tested in Espiocracy. This time, it's flexible and dynamic guidance for actors, point of conflict between entities in the world, capture the flag for the player, and attempt to decipher very convoluted geopolitical situation of the Cold War and beyond.

Let's explore details of a seemingly obvious national interest: rebuilding the country after the war. Members of the government may pursue actions that advance this case - sign treaties to acquire materials, enter alliances that will revitalize the economy, and accept investment offers with strings attached. There may be conflicting ways to achieve the goal: some actors may argue for the communist model of industrialization, whereas others may vouch for the capitalist approach. The government may subsidize particular sectors of the economy, increase the influence of industrial actors, allow trade unions to thrive, and be especially sensitive to labor strikes. Player as an intelligence agency may procure strategic materials, industrial blueprints, and technology, monitor the delicate balance between investment and exploitation. Most importantly, since national interests are generally objective (well-known internationally), enemies may outright target them, disrupting the efforts with a plethora of tools - from propaganda degrading the country in the eyes of investors to outright sabotage of industrial facilities - which can be intercepted, counteracted, or prevented from happening.

Even this kind of simple and non-aggressive national interest (literally building tall) can become a bone of contention. Imagine what happens when it comes to nukes, ideologies, populations, territorial disputes, colonies, or terrorism!

National interests are set dynamically by the situation (such as destruction -> rebuilding), military logic (such as the acquisition of nuclear weapons -> prohibiting other countries from acquiring nuclear weapons), and direct political decisions (including covert ones, with the acquisition of nuclear weapons being one of them). Returning to the declaration of war, national interests here usually take the place of the good old casus belli (with CB still possible but less significant), where "protecting all Americans abroad" as national interest becomes one of the arguments for invading Grenada in 1983 (600 U.S. citizens studying medicine on the island).

Final Remarks



Now we're ready to explore Conventional Wars in Espiocracy, to be described in the next dev diary

If you're not already wishlisting Espiocracy, consider doing it:

https://store.steampowered.com/app/1670650/Espiocracy/

There is also a small community around Espiocracy:



---
"We have no eternal allies, and we have no perpetual enemies. Our interests are eternal and perpetual, and those interests it is our duty to follow" - Henry Palmerstone, British Prime Minister