1. Espiocracy
  2. News

Espiocracy News

Dev Diary #42 - Reports 📃

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.

---

Tom Clancy used to say that he loves research more than writing. Indeed, there is something deeply captivating in piecing together data, context, and meta-commentary to understand a topic. Development of Espiocracy is supported by an unhealthy amount of such work, including megabytes of excerpts found in online discussions on history, espionage, and games. If you posted clever takes on grand strategy games, there's non-zero chance that your comments are somewhere in my files, and perhaps even contributed to the reasoning behind the game, like this opinion:

"At its core, any grand strategy game is essentially a simulation of government, or perhaps business, operations. But pretty much all of them lack what even the smallest modern government offices have: robust reporting, metrics, tools the boss can use to get a quick and accurate view"


In a meta-meta-take, the player in Espiocracy is equipped with automatic research tools: dynamic reports. More than just a summary of data on the evolving game world, a report takes on some of the roles that would be traditionally implemented by popup events in the usual grand strategy games. In yet another iteration on gameplay in strategy games, reports will use extract and present data to systematically build the narrative, highlight interesting stories, and provide meaningful decisions - while remaining under full control of the player.

[h2]Opting in[/h2]

Players can opt-in to receive reports on any selected entity:



Unlike classic pins (and other attention management tools in strategy games), this is not a feature designed solely as a UI shortcut for power users. Instead, players start by default with a set of starred entities and categories, such as their own country or domestic political changes. Gameplay and its pacing is designed for people who use reports from day zero to make sense of thousands of actors, constantly changing political situation, and many other revolving doors of the Cold War and beyond.

[h2]A report[/h2]

After starring an entity, the game begins to provide regular reports following a simple self-referential trajectory: the first report is usually an introductory summary, and then subsequent reports regularly paint the landscape of changes (comparing changes between the last and current report). If the subject has an end, e.g. an election, there is also a final summary. Rough example:



This clear way of following events in the game is currently prepared for crowded parts of gameplay (such as the composition of actors) and significant historical processes (e.g. conflicts, decolonization, nuclear race). In the future, it can be elegantly expanded to other parts of the simulation, and modded to, say, highlight data judged as more relevant by players.

Reports, in addition to the pure descriptive role, can be also directly actionable - they can present checkboxes that will launch precise actions:



As a rule, these are not exclusive to reports (they are available in other parts of the UI) and instead play the role of guidance for beginners or shortcuts for more advanced players.

[h2]Onboarding, Assistance, Dynamics[/h2]

Player starting a new campaign is welcomed by a few initial reports: on the state of the country, on the intelligence community, on imminent risks and opportunities. They usually contain recommendations that can delegate the staff to deal with not obvious mechanics which are already important in 1946 such as lobbying for improved border control or laundering illicit funds inherited after WW2. Moreover, additional guiding hand is planned in the form of assisting reports that regularly detect (and explain!) the most popular failures and recommend appropriate actions.

Reports are slightly gamified to diegetically separate them from pure UI tools. Every report requires a few days from one staff member (spending an operative in terms of game economy), which means that very small intelligence communities can naturally afford fewer reports than larger ones. On the opposite side to this cost, I'm also experimenting with report-exclusive gains such as increasing tactical intelligence or identifying new opportunities, consistent with the analytic work of staff behind the reports.

Last and least, all reports are stored in the archive where you can trace back events of previous conflicts or even use them to get up to speed when loading up a save after a break.



[h2]Final Remarks[/h2]

The next dev diary, "Events", will be posted on May 12th.

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:



---
"Chairborne Division" - nickname for Research and Analysis branch in OSS

Dev Diary #41 - Intelligence Programs 🏗️

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.

---

Why do we play video games? David Bellavia, recipient of the Medal of Honor for the Battle of Fallujah, recently wrote that young people are "wasting the treasure of life on games". Players, however, are largely immune even to the most scathing words from the most decorated person because they don't seek validation in the first place - the point, instead, is to pursue any fantasy in the comfort of own screen, regardless of external judgment. Paradoxically, this critique reflects perhaps the most important facet of games: freedom. We play them because we can and want to.

Freedom propels much of the development of Espiocracy. Linear choices, build orders, or rigid rule-based strategies are constantly and iteratively replaced by dialing up player agency, kicking doors between mechanics, and making gameplay more varied.

One of areas that recently received such treatment was spy gear described in DD#24. Today, wiser by a year of development, we'll take a look at its new form.

[h2]Intelligence Programs[/h2]

Instead of choosing the most optimal minor spy gear such as lipstick gun or poison umbrella, you can now launch intelligence programs that significantly influence gameplay. Depending on the size of intelligence community, the player can run in parallel 1 to 5 programs. Some players already start with ongoing or finished programs - for instance, the British player can instantly use the fruits of Bletchley Park, the American player has still active Venona Project, and the Soviet player has active poison laboratory.

Programs are divided into technical and operational.

[h2]Technical Programs[/h2]

Technical programs develop advanced devices or methods, which can be used in operations or rolled out on the map. Examples include:

  • radioactive tracking (such as codename Cloud in Stasi), radioactive lockpicking, nuclear backpacks
  • poisons and BCW (currently: mustard gas, tabun, sarin, novichok counterpart, ricin, botulinum, anthrax)
  • spy planes (such as U-2 and SR-71), satellites, balloons
  • special platforms (such as Glomar Explorer)

Their availability depends scientific and technological paradigms mastered by local actors and level of capabilities in the intelligence community. More than pure tech tree, programs follow the path sketched out in DD#24: acquisition of secrets, illegal experiments, interesting contacts, genius inventors, and cooperation with industry/academia. The last point sometimes escalates even to the level of influential actors, where, for instance, developing a spy plane may require convincing local military leader.

[h2]Operational Programs[/h2]

Operational programs are de facto continuous operations without precise target, objective, or location on the map. Categories include:

  • mass surveillance (mail interception, sampling typewriters, tapping telephone switchboards, surveillance state up to Stasi levels of 1 source per 7 citizens, and so on)
  • controlling public opinion (from press censorship to great firewall in the late game)
  • decryption and interception
  • field programs (e.g. systematically breaking into embassies)

Ability to launch them is tied not only to technologies and capabilities - some of them depend on external events. Much like Venona Project started to exploit duplicated one-time pads in NKVD, ability to pursue other programs is sometimes creatively tied to arising opportunities (e.g. censorship enabled by a war in the region).

[h2]Standard Development[/h2]

Standard (and less standard) spy gear has been moved to the background where it's now autonomously developed by every intelligence agency. Free program slots contribute to the pace of this process, which means that not running a program for some time is also a decision contributing to gameplay.

Under this umbrella, Espiocracy now can feature many more flavorful tools of espionage. Beyond acoustic kitties and explosive lumps of coal mentioned in DD#24, the menagerie now extends to all staples of spycraft: invisible ink, sophisticated bugs, miniature cameras, ingenious communication devices, even to the point of late-game malware and wipers. Development of spy gear regularly enriches intelligence community with new devices which then can be used in operations or sold to other players. Particular drops in the rain of such item is partially randomized, mirrors technological development from 1946 to 2022, and can be indirectly influenced by capabilities and operations (e.g. conducting assassinations leads to inventing new types of concealed weapons).

[h2]Final Remarks[/h2]

The build undergoes deeper reshuffling work, hence no screenshots this time. The next dev diary, "Reports", will be posted on April 28th.

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:



---
"The project was considered fantastic by the realists, unethical by the moralists, and downright ludicrous by the physicians" - Stanley Lovell in a preliminary report on truth drug, 1942

Dev Diary #40 - April 1st Special 🥸



Someone already typed it in: https://replit.com/@rafgro/NANOESPIOCRACY

Context for younger fellas: https://whynowgaming.com/the-rise-and-fall-of-type-in-games-listings/

Dev Diary #39 - AI Players 🤖

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.

---

Dev diaries of Espiocracy often explore the nature of (good) strategy games. The yearning for crafting own agency during gameplay, for the rocky marriage of immersion and strategic decisions, for interesting emergent simulation. It's time to wrestle another hallmark of the genre: challenges generated by other artificial players.

It's not a feature of all strategy games - colony managers and city builders pose the player mainly against the environment. Espiocracy harbors rich dose of such environmental challenges, as should be the case for the Cold War and beyond, to the point of implementing a kind of AI for the most important cogs (actors). However, the main challenge in this game stems from vigorous competition between players: hunting spies, stealing assets, ambushing operations, or even turning operatives against a player. This is further complicated by a game of information with covers, traps, bluffs, and the entire geopolitical poker. Artificial intelligence for THAT surely requires special approach.

Indeed, it does.

[h2]The Player[/h2]

To allow precise discussion, let's begin with a quick recap on the player persona. In Espiocracy, you play as an intelligence community (a set of intelligence agencies) of a single nation.



As the first dev diary proposed, a player here is the most resilient entity of the period, right in the fascinating middle between playing as an entire nation and playing as a small group of characters. For the player ecology, it means that the game harbors secondary (to international) layer of diplomacy: non-kinetic interactions between intelligence communities. Following DD#8 (to be refreshed and expanded in another dev diary), these include communication, alliances, deals, or partially controlling another player. This is further exacerbated by the fact that every player can try to get a foothold on the ground held by another player, in what can be described as a state of constant war. With this unusually competitive landscape in mind, let's jump straight into AI of such players.

[h2]Climbing the Shoulders of Giants[/h2]

Implementation of AI players in Espiocracy follows the principles of chess programming.

For 70 years, chess programmers have been writing engines that can competitively play chess, a game with tree complexity reaching 10 with 123 zeros. They have been working on outsmarting chess grandmasters for the entire Cold War and succeeded just a few years after its end, which is yet another topical and historical parallel that permeates development of Espiocracy.

This niche field generously offers many clever solutions that crave to be implemented in strategy games. Naturally, there are many reasons why they have not been (largely) included in games up to this point. First and foremost, they require counterintuitive approach to development. Instead of writing AI five minutes before midnight when a game is complete, Espiocracy features AI since early builds. In a nuanced way, parts of the code have to be explicitly designed to allow the development of appropriate AI - similarly to architecture requirements posed by multiplayer. Sometimes, even player-facing mechanics have to be (re)designed for AI. As a testament to this design lens, in what began as a hermetic joke and ended up as actually useful implementation, the player is currently served with interfaces corresponding to the dynamics of a chess game:



What principles, precisely?

  • State of the game from the perspective of a player (resources, intelligence, alliances, politics, other players, and so on) is approximated in a multi-dimensional vector, an analogue to chess position. As a must for an espionage game, this point also implements absolute no-cheating paradigm (AI players do not have any more intelligence than a human player would have in the same situation).
  • From such position, the game generates a (limited/filtered) list of legal moves such as launching an operation against a particular target, establishing a station, nudging an actor towards an action, or directly attacking other players (captures).
  • An AI player can ask the game to simulate making a move, own move or other players', akin to asking: what will happen after I arrest this operative? The game responds with an updated position which, importantly, stems from internal rules that approximate changes in the world in a way easily understood by a human in a single sentence (e.g. establishing an intelligence station will subtract money and free operatives, but it will establish local spy network in the future and improve outcomes of local operations). The new position can be used further for analysis or to repeat the cycle of generating and making moves.

This framework sets up the stage for developing AI players that utilize decades of lessons in chess programming. In the most universal approach, AI regularly evaluates positions and finds a combination of moves that will improve the position by the highest value.

There are many exciting solutions that flesh out the details (piece-square tables, alpha-beta search, even a counterpart of opening books). For a nice and easily understandable demonstration of the ingenuity of chess programmers, take a look at mobility. Mobility is the number of available legal moves. In chess, statisticians found a definite correlation between higher mobility and victories - better players usually create more opportunities for themselves. This point of view makes a lot of sense in Espiocracy which, much like immensely complex chess, can be meaningfully reduced to mobility (a single number!), or as we know it here, player agency. With a rather simple algorithm, AI players can find a series of moves that increase mobility, which already leads to pretty sophisticated gameplay such as accepting small losses for larger long-term gains, expanding in preparation for invasive actions, or eliminating enemies that may limit future expansion. This is only a single fascinating solution among hundreds available. And it's not the end of innovation in this department...

[h2]Open AI[/h2]

The gravity pull of chess programming, the one which worked for 70 years and still draws people to this day, may be slightly difficult to understand from the outside. If I would have to explain it, I would compare it to a boxing championship for programmers. Thankfully, I don't have to, because the modding scene of strategy games speaks for itself - given the ability to mod, almost every strategy game receives AI mods, some of which are developed with immense dedication for years. Their authors develop them often despite heavy limitations or technical hostility of the game to modifications in AI behavior.

In the spirit of chess programming, Espiocracy will be fully open to multiple external AIs via dedicated API in C#.

The game will be released with a few AIs implemented by yours truly, using chess programming lessons to the best of my ability. However, that ability is severely limited not only by my brain and time but also perspective. Critically and perhaps controversially, I think that too many strategy games suffer from (relatively) poor AI because developers cannot unsee the implementation of mechanics. As laid out in the introduction, solid AI is too important for this game to leave it solely in the hands of the developer(s). By developing both a fish and a fishing rod, I have a sincere hope that one day you could play Espiocracy with easily developed AI mods authored by people much smarter than me.

To allow a truly competitive nature of AI development, the game is already set up to allow multiple different AIs assigned to different artificial players. In a dream-come-true difficulty settings, instead of deciding between degrees of handicap, you can now choose to play against artificial players who can be actually more stupid or more intelligent.



As you can probably guess at this stage in the hereby honeypot for programmers disguised as a dev diary, AI configuration is used not only for difficulty management or for recording timelapses of USA with AI_X vs USSR with AI_Y. In parallel, I'm working on tools that would measure and compare AIs against each other, have a counterpart of strategic test suite, and maybe (I didn't go that far yet) even a multipolar analogue of Elo rating.

Last but not least, I see this openness as an investment into the unknown future of new tools, about which we hear in recent months. By implementing open API, I'm leaving the door open for the day when our computers will have enough power to run deep learning algorithms with strategic reasoning skills.

[h2]Behind The Scenes[/h2]

► For the folks curious about the last remark, we may be surprisingly close. You can already run a 25x smaller equivalent of ChatGPT with a speed of ~2s per sentence on an 8-core CPU. It's large enough to exhibit pretty complex reasoning and planning. Naturally, it's still too slow to power ~100 players in parallel, but once the mechanics are more complete, I can honestly see an attempt at managing an American/Soviet player with its faster iteration (which would probably require most engineering around translation of the quantified position into text description - tinkering with the representation of position is a common trope for many chess engines).

► Speaking of efficiency, this is also a significant chunk of the chess programming legacy. In addition to their numerous tricks, I'm testing unusual distributed approaches (such as... queuing reasoning of AI players to the moment when the game is paused) and explicit computation management. In an ideal case, AI players would receive a limited computational budget, much like in chess engine competitions, which would be set up in game rules. Moreover, comparative tools lend themselves to easy measurement of performance which also should be communicated to the player (e.g. consciously choosing more intelligent AI that will slower ticks by X ms).

► If you want to begin scratching that chess programming itch, have a look at 30 weird chess algorithms, simple & strong chess engine written in 131 lines of Python, elegant pseudocode of Negamax C*, and then lose yourself in clever takes on finding good moves.

[h2]Final Remarks[/h2]

The next dev diary will be posted on April 1st.

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:



---
"Turochamp, a chess program by Alan Turing and David Champernowne developed in 1948 as chess playing algorithm, implemented as . Since there was no machine yet that could execute the instructions, Turing acted as a human CPU requiring more than half an hour per move. One game from 1952 is recorded, which Turochamp lost to one of Turing's colleagues, Alick Glennie. (...) The system anticipated much that has become standard in chess programming." - Chess Programming Wiki & Jack Copeland

Dev Diary #38 - The Lives 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.

---

"Living, breathing game world" is a marketing term that in the last few years was abused enough to be associated with big empty sandboxes rather than interesting worlds. In a way, its popularity is inversely correlated with actual living & breathing worlds - in the 1990s and 2000s, arguably more games tried to pull off ecology systems or independent lives of NPCs, despite much stricter computational environment. In 2013, Tynan Sylvester, developer of RimWorld, diagnosed this "old dream in game design, the simulation dream" as "shattered and killed" by overwhelming complexity. A decade later, wiser by playing many fantastic indie games with intertwined simulated worlds, we meet here to wonder how the dream has been partially resurrected, and how Espiocracy can stand on the shoulders of these giants.

This period has seen game developers proudly saying that they're not really in the business of developing games - they're instead creating story generators, intentional sandboxes, or straight-up simulations. Instead of trying to fit square simulations into round games, they embraced the simulationist approach as the primary driving force.

Although I'm not brave enough to verbally join this crowd (Espiocracy is very much a strategy game first), the wider lesson is used here extensively: to create actually living, breathing game world, sometimes one may have to forget about the "game" part. This is the ultimate paradigm behind the large cast of (hopefully) believable and real actors in Espiocracy.

[h2]Not Only Predictions[/h2]

In cooperation with the framework of motivation and predictions, actors also observe the world and directly react to changes - usually to actions of other actors. This creates natural disputes, such as actor X vehemently opposing constitutional changes proposed by actor Y, followed by response to response, and so on. More than just reaction chains, such an approach also ensures long-running series of interactions between actors, which form the basis of relationships between them (e.g. actor A supporting actor B over a number of issues leads to an alliance and further cooperation).

In addition to predictive and reactive activity, actors (both individual humans and organizations) live their own lives in the background. Every actor has routines - regular low-level activities. Let's take a look at the most prevalent examples, and how they are tied to historical simulation:

  • Going on holidays to X -> Many human actors regularly move on the map to their favorite place(s), which opens up opportunities such as interception or taking power in absentia. This is how an analog of the 1991 Soviet coup d'état is included (Gorbachev went on holiday to Crimea and was isolated there by the conspirators).
  • Working usually in X -> Actors working in the same place, e.g. government buildings, bump into each other and have more interactions. Others may prefer seclusion for its security, such as the late paranoid Stalin staying mostly in his dacha protected by camouflaged antiaircraft guns, or just for its peace, such as writers churning book after book on a household typewriter.
  • Active in X -> A human actor can have a specific type of job in addition to what they're known for (e.g. Orwell at the start of the game is not only writing books but also works in the British press), an organization can contribute its members to additional activities (e.g. a church may run many schools), which expands actions available to the actor, and accumulates effects over time.
  • Campaigning -> An example of routine tied to actor type, in this case, unearthed before an election by political actors, which limits time available for other activities, and makes a human actor or an organization's members travel on the map.
  • Hiding -> Atomic option for actors vehemently afraid of capture (see: Saddam Hussein in 2003), which severely subtracts influence and limits all the other actions for the price of eventual survival.
  • Heavy drinking -> A routine may be less of a conscious decision and more of a straight vulnerability (with rare unusual trade-offs, such as two human actors with the same routine getting along).

These quasi-environmental activities are supported by fully environmental actor events. They cover anything along the lines of diseases, accidents, severe mistakes of important members, lucky business bets, random meetings with other actors, or even falling in love. In the dark world of Espiocracy, such events are not fully random (hence "environmental"), and instead, they can be caused by other actors or players, while keeping the cover of just an event (it's love at first sight, not a honeypot!).

[h2]Plots[/h2]

Motivation, predictions, reactions, routines, events... If you've read any book about good storytelling or building interesting characters, you may have a nagging feeling that this list lacks something larger than just an individual character - it lacks the use of tropes. How can this system capture revenge, redemption, or more complex arcs?

Most interesting tropes are directly implemented in Espiocracy as plots, that can take over the minds of actors, and then guide their actions. As plots rather than explicit tropes, they are less of a comic book arc, and more of a realistic combination of goals and methods, for instance, very Cold-War-ish unmasking the enemy within is used to propel McCarthyism by regularly pushing actors under its influence towards witch hunt and deeper paranoia.

Usually, plots are acquired in response to something, with a classic example of a revenge plot kicking in after large damage is attributed to another actor (including the player, e.g. revenge against the CIA after it killed the family of an actor). They may end once the goal is outdated, approximately achieved, or when actor's motivation fades away.

[h2]The Big Picture[/h2]

Soaring even higher in our bird's-eye view, actors are influenced not only by aforementioned mechanics (and implied wider game world, in the form of i.a. wars or nukes), there is also a dedicated mechanic for local competition between all actors.

Actors are primarily characterized by 0-100 parameter of influence, which gates available actions and their reach (as described in DD#6). Every country has a limited pool of influence tied to local population size and State Power Index, roughly enough for 4-30 influential actors. The influence of any actor depletes the pool, which establishes an emergent competitive environment:

  • Actor's ability to increase influence is scaled by whatever's left in the local pool. An actor increasing own influence simultaneously lowers that capability for all the other actors. Correspondingly, an actor lowering the influence of other actors frees it up to be captured.
  • Overcrowding hurts all actors and eliminates the weakest ones.
  • Power vacuum is real, quantifiable, and generates dynamic power grabs.
  • New actors pick up the fight by merely existing and requiring initial influence.


[h2]Final Remarks[/h2]

After our journey through the game world of Espiocracy - the map, world entities, and behavior of actors - it's time to get closer to the players and gameplay (and finally some lovely screenshots). The next dev diary, "AI of Players", will be posted on March 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:



---
"Passion is the friction between soul and the outside world" - Andrei Tarkovsky