Skip to content

JsMarq96/BruhBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BruhBot

Twitter bot that procedurally says "Bruh"

The project itself

I have always wondered about procedurally generated content, so I wanted a quick project to toy arround and implement a noise function. In this proyect I programmed the Perlin Noise Generator, and a State Model (to force a coherent string structure), with probability associated transitions, like a Markov Chain.

How

First, we generate the State model transitions, in which each letter is a state, with transition to the next letter and itself. The random variable used for the transitions is the Comulative Distribution Function of a segment of the Perlin Noise. If I just used the Perlin noise, the string may had come out completely unrecognizable, so the State Model is used for basic formatting.

Perlin Noise Generator Implementation

The Perlin noise in N-Dimensions algortihm, consists in interpolating values between a N+1, unit distanced, random gradient vectors, in order to generate a smooth surface between the gradients. But the implmentation that Ken Perlin did, presents a more confusing implementation, with perfomance in mind. Taking into consideration the moment the paper was presented, the processing power and memmory where limited, so he implemented a pseudo-random, low-cost, hashed random gradient. This is implemented in the calculate1D method in PerlinNoise.py.

I also included a more straight-forward implementation of the algorithm, in the calculate1DNew method, in PerlinNoise.py. Both methods have been comented with a lot of detail, in order to provide some help undestanding both.

Python Dependencies

  • Tweepy (for tweeting)
  • Numpy
  • Random
  • Math
  • Matplotlib (for testing the PerlinNoise.py)

Launch

In order to lauch the Bot, just execute

python BruhBot.py

If you want to test the PerlinNoise.py, use

python PerlinNoise.py

References

Bruh

Bruh

About

A Twitter bot that says "Bruh" procedurally

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages