home // text // multi-media // misc // info

[ bots ]

Bot – The Lytton Tribune

Hi there.

A few years back, twitter bot @agistuff posted a sprite sheet from the original Police Quest:

[PQ1 sprite sheet from @agistuff]

So, first of all, now that I’m not playing the games as an eight year-old, I’ve realised that the Police Quest series is racist, neoliberal copaganda. Read this and this.

Anyway, the @agistuff post inspired me to make my own bot to generate random maps of Lytton, the fictional Californian city in which the game takes place; but a more utopian vision, where the police have been abolished, and social services are staffed, funded, and invested in uplifting the community. Where humans thrive, not property.

Now, the full city map of Lytton, as seen in Police Quest 1, is available on VGMaps:

[Lytton map from Police Quest 1]

And a standard city block looks something like this:

[A generic city block in the Lytton map]

I was encouraged by the presence of a basic underlying street grid and repeatable building blocks (in all senses of the term) – at least, they suggested that the task had a simple, finite scope, and an achievable sense of fidelity/believability.

I’d originally considered making sprites out of every individual building on the map (similar to @agistuff’s image, but for every building) and randomly selecting & fitting them within the terrain boundaries; I even considered using Wave Function Collapse to generate city blocks. You can find some of my formative steps in an old, short, archived twitter thread.

In the end, with a mind to the project scope, I went the simpler route of just extracting city blocks from the original map. For instance, these are all the city blocks in the centre-right grid cell on the original Lytton map:

[Several potential city block sprites to slot into position]

The algorithm then iterates through each of the cells in the street grid, and chooses a random sprite for that position; the sprites layer on top of each other nicely, and you get a completely random city grid, made up of randomly-selected city blocks from the original map, like so:

[A randomly-generated city block of Lytton, CA]

There are a few further adjustments: foremost is the presence of both highways and “special” city blocks (such as the Hotel Delphoria, the Lytton Courthouse, and so on). The algorithm has a random probability of generating a highway map (with surrounding tiles randomly selected as before); if it doesn’t generate a highway, it also has probabilities of using some of the “special” blocks in the map. Otherwise, though, these variants don’t significantly alter the algorithm.

Next, I wanted the bot to include a text component, to at least hint at life in the post-cop utopia. Newspaper headlines & ledes have a nice structure that lend themselves well to random generation, and so I quickly settled on The Lytton Tribune as my framing device, using a Tracery grammar to describe all of the possible headlines. The text is context-aware (with help from the original map generation parameters), and so it can refer to street names from the “real” map of Lytton (including knowledge of Highway 41 and the city limits), as well as the “special” buildings, if present. Some highlights during testing:

  • 🧁 STREET SALE
    Great deals on frieses. Bring your own valises. Fifth & Rose.
  • ⛈ WEEKEND OUTLOOK
    Partly cloudy and windy with a chance of thunderstorm heavy rain fog/mist. Don’t forget your nightgowns.
  • 👛 STREET SALE
    Great deals on schisms. Something for everyone! Length of Lily.
  • 💒 JUST MARRIED
    Patrick Cruz, Alana Stevens, & Kiara Miller. Honeymoon Highway strewn with flowers.
  • 🌲 COTTON COVE
    Sample some park cheese. Bring a vest.
  • 🚵‍♀️ TOUR DE LYTTON
    Perfect weather for a bike ride. Hot beluga caviar at the finish line.

I didn’t want to imply that a world without the institution of policing would be an unalloyed Eden, and so I did allow space for the community to confront & overcome certain disasters, challenges, and personal crises. Importantly, I wanted to suggest that social services & community intervention are a kinder form of justice:

  • 🥀 IN MEMORIAM
    Lillian Campbell-Powell (31 yrs) Services this Saturday at Bert’s Park.
  • 🏠 UNHOUSED
    65 comrades in need. Hot French sardines served at Caffeine Carol’s.
  • 👤 WELCOME BACK
    The community welcomes Josiah Roberts after a lengthy rehabilitation. ‘I couldn’t have done it without my partners.’

(Keen eyes might also notice that my generated maps also don’t have any traffic lights: I like to think of “the new Lytton” as a social space heavily invested in accessible public transit & pedestrian options, a real fifteen-minute city).

So, finally, to generate a new post, my controller script starts by randomly selecting some traits for the map: whether it’s a highway map or not; whether there are any “special” tiles (as above); whether the post features a “crisis”; and then a regular street grid as a fall-back. A map image is then generated with those chosen parameters, as described above; likewise, those same map parameters are used to define the starting point of the Tracery text generation, resulting in a short headline matching the contents of the generated city map.

The bot is now live on Mastodon, posting once every 6-8 hours; and you can browse the source code over on Glitch.

[A post from The Lytton Tribune, Bot.]

[A post from The Lytton Tribune, Bot.]

[A post from The Lytton Tribune, Bot.]

I hope you enjoy the end result!

If you have any questions, comments, or suggestions, let me know. I am cursed with Online, and you can find me at any of my various hauntings.

a note on justice

Rehabilitative, community justice in the real world must necessarily confront the legacy of centuries of racialised police/state violence; it’s impossible to separate racism, policing, and capitalism. This project itself was conceived in a time of widespread unrest in the face of police riots & police murders, committed primarily against Black americans.

I’ve consciously omitted a grappling with racial, post-capitalist justice & reparations in The Lytton Tribune. It’s disingenuous of me to do so, but I felt it would be more grievous to make a misguided attempt at telling a story I’m not competent or entitled to tell. I went ahead and activated the bot regardless, itself an action with layers of privilege to unpack, but I hope that the trifling context of the thing – a social media bot that reimagines a city from a 37 year-old video game – can forgive the omission. Nevertheless, I strongly feel that it bears repeating, now and always,

Black Lives Matter.

Abolish the police.

Love,

-n

x