Dark Forest: A space world with zero-knowledge proof interaction

Dark Forest is a game whose name is inspired by the dark forest and thought experiment of the same name in the second part of Liu Cixin’s trilogy. This is a game based on zero-knowledge proof.

basic information

Dark Forest’s official time was declared in August 2020, with Ethernet Square application on zero knowledge (ZK) cryptography has made rapid development. For the first time, new tools such as SnarkJS from idn3 enable efficient in-browser ZK proof and verification. These latest advancements in the application of zkSNARK technology allow us to build a dark forest: a completely decentralized and persistent RTS (Real Time Strategy) game.

Dark Forest can be called an MMO space conquest game, in which players discover and conquer an infinite, procedurally generated, and password-specified planet in the universe.

The first beta version of the game v0.3 was released on the Ropsten test network of Ethereum on August 7, 2020.

The current version is v0.6. A whitelist is required for login.


Hidden information games and zkSNARKs

zkSNARKs is a powerful encryption tool that can be used to verify calculations of secret data. For example, a zero-knowledge proof used in a game like chess may complete the proof as follows: “I am moving my knight from secret position A to secret position B. I will not tell you where positions A and B are actually, but This proof proves that the movement from A to B is indeed a valid L shape.”

To understand zkSNARKs, you need to understand two kinds of games: complete information games and incomplete information games.

A complete information game is a game in which all players know the complete state of the game world. For example, checkers and chess are complete information games, because all players always know the positions of all the pieces on the board. Similarly, CryptoKitties is a complete information game, because all players know who owns what kittens and what the attributes of each kitten are.

Incomplete information games (also known as “hidden information games”) are games in which players may not know the complete state of the world. For example, poker is an incomplete information game because you don’t know the cards in your opponent’s hand. Strategy games such as StarCraft and EVE Online also fall into this category. In StarCraft and other RTS games, information hiding is enforced through the “fog of war”, and the area of ​​the game map will be obscured before the player explores.

The game of incomplete information allows players to explore a richer and more dramatic strategic space. Information asymmetry can lead to deception, conditional coordination, complex social dynamics, and large-scale emergency player behavior. Because of this, almost all popular MMO games are incomplete information games.

Previously, it was almost impossible to build incomplete information on a decentralized system, because the data layer of most decentralized systems was completely open and transparent in design. Zero-knowledge cryptography changes this. With zkSNARK, players can maintain a private state while submitting verifiable effective operations publicly.

Cryptography fog


The core idea of ​​Dark Forest is the fog of war cryptography protected by SNARK. In Dark Forest, players will not submit their conquered planet coordinates to the core smart contract, but submit a commitment to the planet’s position (hashing the planet coordinates) and hashing valid zero-knowledge proofs. This can keep the planet’s position secret.

Similarly, when the player wants to move, they submit the hash value of the planet they want to move and the hash value they want to move to, as well as a zero-knowledge proof to prove that this is a “valid” move.

Since the hash is difficult to reverse, checking the Dark Forest contract will not tell you the actual location of other players. The only way to find other players is through brute force search. In Dark Forest, this means “hashing” the area of ​​the game world, looking for the coordinates corresponding to the published hash. This structure introduces the fog of war that can only be discovered through calculations. At present, the game has been updating its gameplay design, and many hardcore players are trying it out.


Posted by:CoinYuppie,Reprinted with attribution to:https://coinyuppie.com/dark-forest-a-space-world-with-zero-knowledge-proof-interaction/
Coinyuppie is an open information publishing platform, all information provided is not related to the views and positions of coinyuppie, and does not constitute any investment and financial advice. Users are expected to carefully screen and prevent risks.

Leave a Reply