Hey there! So on the quest to develop a coherent, procedurally-generated gameplay experience for Peacenet, we came up to a bit of a roadblock. There wasn’t really a great way for the game to generate new hostnames for NPC computers - or really any names for any item in the game at all.
…That is, until now. Enter Markov Chains. A Markov chain is a mathematical algorithm that experiences transitions from one state to another using various probabilistic rules. If you don’t know what that means, don’t worry. Basically, in our case, it’s used to predict the next letters in a word and choose a random one.
But how does it know what to predict?
Simple! We train it. By giving Peacenet’s world generator a list of words, it is able to build associations out of the letters of the words. These associations, as well as your world’s seed (based on what you name your own character), are used to create new words out of the ones we give the game.
For example, if we give the game this list of words:
serenity
unite
tech
The game will run through the first letters of each word - s
, u
, and t
. It’ll choose one by random. If I were the game, I’d pick s
.
Then, it’ll look for letters that could come after s
, choose one at random, and continue until there are no letters that come after the current one. The word it ends up spelling ends up being the new hostname.
So, remembering that I chose s
as my letter, let’s give it a try manually. I can see that e
could come after s - nothing else comes after s according to the training data, so I’ll choose e
. Now, I can see that either an n
, r
or c
can come next, so I’ll go with n
. After n
could come i
, so that’s what I’ll have to choose. After i
can only be a t
, so, that’ll be my choice. Now, I can choose either an e
or a y
, I’ll go with e
. Now, I could either end the word right here (unite
ends with e
), or choose a c
. I feel like choosing a c
. And since only an h
can come after c
, I’ll choose that. And since no letters can come after an h
, I’ll return senitech
as my new word.
Pretty simple, right?
Yeah. Well, there’s still one issue - we don’t have a lot of training data - and it’s the training data that decides what letters get to be chosen. Which means, the more training data, the more interesting the game’s hostnames are.
And we don’t have much training data. So, let’s make this a community effort. Let’s train Peacenet, together. Post any cool hostnames you can think of by replying here - the more, the merrier. Hopefully, this should speed development up quite a lot since we’ll have training data to generate the game’s world and we’ll have a world to hack.