Filtering Procedurally Generated Names

Background:
My team are creating a game where we’re using a Markov Chain implementation to procedurally generate Celestial Body names in our Universe Generator and know that we need to filter the result of each name generated against the Roblox text filter and throw out any censored results and re-generate the name.

Problem:
The Roblox Filter is always changing due to its machine learning algorithm and with our Universe being procedurally generated a single word suddenly becoming filtered one day would cause the generator to have to miss it and re-generate that objects name, creating an entirely new universe as a result.

Now even if we make it so that only the names of the objects are effected by this, it means that the names of all objects generated after the effected objects original name became filtered will now also have a new name and this isn’t ideal behaviour either.

Does anyone have any ideas of how we can get around this safely and without bypassing the filter?

Note: this is my very first topic on the forum so constructive criticism is also welcome

2 Likes

One solution may be to make this ‘seed’ inaccessible to other players – you wouldn’t need to filter it then. I don’t think there is any other way.

The seed is only used by the Random object and is not viewed by anyone. The thing we’re needing to filter is the names being generated but each time a name is generated the seed changes inside the Random object which is why if a name is picked up by the filter it would cause the problem stated in the OP.

Creating an identical universe on each server requires all parameters to be the exact same every time, a single hiccup such as a name suddenly being flagged by the text filter changes the generation result dramatically.

1 Like

Store the unfiltered name and only filter for the clients to see and don’t save that one.

Doing this results in clients occasionally seeing a hashed out Planet/Galaxy name

Then make a system where you don’t need to filter?

We are at the same time thinking about alternatives to this implementation which do exactly that

You could have a huge word list and add for example 2 random names together from that list.

You only need to filter text that…

  • Is written by another player or the same player from a different session
  • or comes from an external source that you don’t have control over
  • or comes from a source that you do have control over, but can result in inappropriate text.

Since you have control over these procedurally generated names, you can remove the filter as long as you can assure that the names won’t produce inappropriate text.

1 Like

The problem with procedurally generating content is you cannot know every possible permutation and it isn’t worth the risk that a single Planet out of the 1000s has an inappropriate name and us not know before release.

We’ve decided to either generate these names once and store them to the DataStore or allow Players to name Planets themselves, filter the text and save it if approved.

2 Likes