1. Espiocracy
  2. News

Espiocracy News

Dev Diary #43 - Events 📰

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.

---

If you search Wikipedia for the genre of Espiocracy, "grand strategy game" (GSG), you won't find an article with such title. Instead, you will be redirected to "wargames", focused on military strategy, "that include Risk". It is probably the only description of Risk as a grand strategy wargame on the entire internet. In an interesting parallel - perhaps authored by like-minded people - this article unapologetically invents proprietary takes as much as the (actual) genre itself.

GSGs are famous for their unusual gameplay with multi-layered maps, spreadsheet menus, dense tooltips, and a plenitude of popup events. The last feature is where much of history, storytelling, flavor, DLCs, and modding happens in the genre.

Initially, Espiocracy implemented events typical for GSGs. However, during two years of development, these turned out to be too detached from mechanics, negatively impacting gameplay flow, lowering replayability, and even subtly encouraging lazy takes on the history. The table has been flipped (for some time, the main build had completely no events) and after many iterations, the game arrived back at a fundamentally different approach to events.

Now, instead of random external triggers that conclude in a popup interrupting gameplay, events in Espiocracy highlight mechanical changes in the world. They do not disrupt main strategic gameplay, do not uncontrollably descend on the player, and do not feature ad hoc decisions that give arbitrary modifiers. It's no coincidence that two weeks ago we explored reports - while reports are about objective rundowns of continuous & wider situations, events focus on more immersive representation of punctuated & local changes in the world.

To achieve this, the notion of global random events has been dropped entirely. Instead, events work in three precise frameworks.

[h2]Contextual Events[/h2]

As the history unfolds around the player, contextual events communicate significant developments in the world. They are purely descriptive and celebratory, intending to slightly enrich spreadsheets and maps with (alt-)historical texts and graphics.

The very first contextual event welcomes the player on March 5th, 1946:



Similar newspaper template is also used for changes in the world that are critically important for the player (= usually involve player's country) such as new wars, unifications, divisions, or... pulling off landing on the Moon.



Text of contextual events is prepared in multiple versions: one universal variant with replaceable nouns/adjectives, and other variants written for historical or very probable alt-historical variants. In the case of landing on the Moon, the event has special texts for American and Soviet landings, while all the other variants (including the above screenshot) are more generic.

Changes less important than landing on the Moon but still judged as important enough to surface to the player, the game uses a teletype layout that has been previously featured in a few dev diaries. Examples of such events include the beginnings or ends of regional conflicts, paradigm shifts, deaths of important actors such as Stalin, important political changes in relevant countries, and so on.



[h2]Narrative Events[/h2]

In a natural next step after reactive and mostly generic events described above, narrative events are active (they can cause small changes in the world) and precise (always tied to a specific local entity). They contribute to flavor of a particular country, an actor, or other entities (e.g. a paradigm), sitting firmly in the realm of (plausible) history, and bridging the gap between mechanics - which are never deep enough - and fascinating details that made us all fall in love with history.

In a process not far from classic GSG events, narrative events have a chance of happening at specific points defined by time and/or arising conditions. They can (but do not have to) modify their subject in a clear & limited manner: only by adding or removing traits.

As a long-standing example of such an event, take a look at an interesting detail about uranium mines in Czechoslovakian Jachymov that made it to the game:



This event is exclusive to "Jachymov Mine" actor, can happen with a total chance of 40% (20% check in 1946, 20% check in 1947), it subtly modifies the situation by adding a "recently disrupted" trait (which may for instance influence ongoing operations around this important target) and is sourced from real events around the mine (and will be further iterated upon n times).

[h2]Random Encounters[/h2]

The next step, after working with history, leans more into the intersection of espionage, history, and the map. Unlike previous categories, random encounters directly interact with the player. They constitute meaningful discoveries, procedurally and regularly planted on the map, that can be unearthed by nearby operatives and stations of any player. In a way, these are an incentive to explore the map as passing through a particular city may be enough to pick up an interesting encounter there.

The details of planting are a bit convoluted and still in the process of working out but players can roughly expect encounters tied to regions, political systems, or local environment. Examples include discovery of WW2 documents, meeting a stranger in bar that leads to an opportunity, or even ability to pull off classic RPG-ish robbery on the road.

[h2]Final Remarks[/h2]

Currently, player attention is managed directly by a set of interaction and importance scores (eg. you'll get Jachymov events after interacting with the mine) compared to the measure of how busy is the player (eg. active x operations in parallel means fewer events). This solution will definitely evolve further to include notifications and other elements competing for player's attention and hence was not explored yet in a dev diary.

This was brief overview of general approach to events. We will definitely return to them, perhaps even individual categories, in the future.

The next dev diary will be posted on May 26th.

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:



---
"That's too coincidental to be coincidence" - Yogi Berra

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