Video games have always been at the forefront of the exploration of new technologies. Games have the ability to test the limits of what's possible without compromising “real” data, giving developers the freedom to try new things and discover the implementations that drive innovation.
Such was the case with personal computing and later with the Internet, which in its early days saw its first network congestion episodes back when it was still ArpaNet and some developer figured out how to play with his friends.
With artificial intelligence, it will be no different. But we are currently in an exciting period where the precise implementation of AI in games has not been discovered yet. Beyond the obvious addition of AI to NPC characters, I believe there’s a more fundamental role AI can play in video games: A State Machine Operator.
The basic premise of the state machine is that there are specific states the machine can be in. For example, in Pokemon games, we are introduced to a free-roaming state and a combat state with definite loops that the player engages with and switches between to complete the game.
A finite-state machine (FSM) or finite-state automaton (FSA, plural: automata), finite automaton, or simply a state machine, is a mathematical model of computation. It is an abstract machine that can be in exactly one of a finite number of states at any given time. The FSM can change from one state to another in response to some inputs; the change from one state to another is called a transition. An FSM is defined by a list of its states, its initial state, and the inputs that trigger each transition. Finite-state machines are of two types—deterministic finite-state machines and non-deterministic finite-state machines. For any non-deterministic finite-state machine, an equivalent deterministic one can be constructed.
State machines are widely available. Parking meters, vending machines, and video game loops are all examples of state machines we interact with regularly. Video game loops are especially interesting because we’ve used them for the past 5 decades to create comprehensive and coherent worlds at an ever-growing scale.
The drawback of state machines is that their states limit the expressibility of the system. If a player wants to engage with the state machine in an unorthodox way, it may not function properly, breaking the experience. Although sandbox-type games aim to allow any number of approaches to the state, this leaves the game feeling bland because of the need to be opinionated about the outcomes. There’s a spectrum developers have to navigate between, making the game open-ended but at the same time specific enough not to feel generic
Enter AI: With LLM-fueled prompts, a new approach can be taken with state machines. Rather than using the states directly, we can pass them to an AI interpreter, who can then “perform” the state as an improv scene. By allowing the AI to use its expressibility while constraining it to the information presented by the state machine, we can create a “smart” set that will generate a coherent, authentic, and unique experience for every user. By enabling the user experience to color the context, we can have highly personalized interactions inside of games at a scale.
My current research is trying to find what the upper limit of the state is that an AI can handle with the current technology. Our state machine design utilizes the Ethereum Attestation service to ensure that the players commit to the outcome of their decisions. We’ve created an ontology that represents the intended game states and uses them along with the openAI JSON mode to enforce the shape of the responses.
The state machine generates new states and later interprets them through the embeddings, enabling a game master agent that is aware of everything happening in the game Universe. By connecting this structure to AI-Universe NFTs we color the context with a spacial theme enforced by the ontology and interface.
The market consensus nowadays is that Ethereum is not suitable for games because of high transaction fees. However, we’re deploying on Ethereum because we’re basing our system on a different approach: off-chain Attestations.
Attestations are a new type of crypto primitive promoted by the Ethereum Attestation Service, which enables the creation of schemas on a registrar smart contract. These schemas provide sources of truth that the users can attest to with their wallet and prove at a later date that they did an action. These off-chain attestations can be chained in a sort of “soft rollup” that users can later commit on-chain once their payout makes the transaction interesting.
With this setup, we can have the benefits of being on EthL1 while maintaining a seamless user experience and infinitely scalable translatability. Furthermore, Attestation schemas serve as metaverse anchors where any other app can utilize its information as a source of truth to contextualize the same user in a different setting.
-> Ingame token issuance: Tokens can be issued by the game master which should have a robust rationale once enough instances of distribution have been embedded
-> Multiplayer interaction: By sorting the game data, we can find related players and instance them together
-> Encounter handling: Encounters can be played out via text in the game or trigger other services to play out the encounter.