Based on the title, I thought this was gonna be something like each spinda pattern corresponding with a string of numbers to turn into inputs to eventually beat a level of doom using the right series of spindas. Needless to say I was incorrect in the best way possible.
Doom minimun requirements: _Have a screen(optional) _Have a CPU(optional) _Human player(optional, someone teached a rat how to play) _Being real(also optional, apparently)
"Bad Apple" is the non-interactive equivalent of "Can it run Doom?" It's a music video based on the Touhou video game series, and it is entirely black-and-white. Which means that any kind of display or visualization that can distinguish between two colors (which is to say, all of them) can be used to display Bad Apple. The Touhou community recreated Bad Apple in r/place - just random people placing pixels onto a communal grid recreated the music video with a shocking amount of accuracy once the replay was sped up.
Its not random people. Its all coordinated. Any and all images on r/place was coordinated or it wouldve been utter chaos (probably why Canada couldnt draw a leaf)
@@mimisezlolspecifically the osuplace and touhou place discords. I was actually the person who did a large amount of the manual cleanup of the animation frames (after running it through downscaling tools) Devs from osuplace developed the overlay scripts that we used to automatically display which frame we were on so real humans could see what needed to be placed and when. It was over 6000 frames, resolution was 40x30px and framerate was something like 40seconds per frame for over 3 days straight
Doom and Bad Apple are both rules of the internet, they go hand in hand. If it has a screen; it can play doom If it can exist in at least two states, it can play bad apple. Bad Apple is a boss theme from TouHou and got a remix on a CD that was released some time after the game it was featured it came out. This remix got used in a 3D animated music video that was quite ahead of its time for an indie animator making in his free time. And since that video took the internet by storm, a lot of people sought to recreated it on whatever they could. Including Minecraft Sheep, Rubik's Cubes, Super Mario 64, RGB keyboards, and many many more.
I have to bring up GTA San Andreas as well. Any game as long as it can be modded will eventually have at least the main character replaced by CJ at some point lmao.
Calls it a boss theme instead of a stage theme. I looked at the comments to see this man get corrected about the anime statement only to see that apparently the comments can't get it quite right either.
This "optional homework" challenge reminds me so much of this video from a channel called Stand-up Maths. Basically, he tried to find the perfect set of five five-letter words to use for Wordle, all of which had unique letters from each other. His proof-of-concept code took 32 days to run... and after submitting the idea to his viewer base, they got it down to less than 3.5 milliseconds. Have fun, Mr. adef :)
I went right there, too. And audibly groaned when the genetic algorithm was wheeled out. The guaranteed way to eat up compute when you don't wanna solve the underlying puzzle.
When you asked if I had a favourite Spinda pattern I, like a normal person of course, thought "why yes, it's the one where the dots cover its eyes" SO IMAGINE MY SURPRISE
Using a genetic algorithm to solve this problem is wild and almost certainly something Jakob did as a learning exercise. A realtime Spinda matrix screen (never thought I'd write that in my life but here we are) is definitely possible using image masking and bit manipulation, since the x and y coordinates of the dots are made by splitting the 32bit PID into four 8bit numbers. I might take a stab at this myself. Thank you for another incredible video on a topic I would never expect
Another easy optimization win would be only running whatever search algorithm on grid cells that contain both white and black. The totally white and totally black cells have fixed patterns. Could also run a dilate filter first to get rid of noise.
@@jabelsjabels Exactly, the ceiling in the Doom video was displayed by identical spindas throughout pretty much the entire video. That should save a lot of work. Any spindxel displaying a value darker than X or brighter than Y should automatically display a set spinda pattern. So, what you said, but interpreted by a layman.
Using a compiled language instead of Python would also speed it up hundredfold. With that and a better algorithm it should take a couple milliseconds at most. This is a nice proof of concept though.
I'll propose an algorithm that would be much faster. The reason the algorithm takes so long is because you actually care about tracking the PID of the Spinda, which leads you to generating a random Spinda and checking its fit. You ended up using enough Spinda faces to consider them "pixels" on a screen anyway, so you can skip all of that computation by just deciding where, within the possible bounds of each Spinda, you should draw the 4 dots, and then place them there, without bothering to know what the PID that would produce that Spinda is. For example, you could take the black-and-white frame of DOOM, divide it into a sub-image for each Spinda, then divide each sub image into the 4 bounded squares that each dot can occur, and simply find the center of the "red" pixels, and place the dot centered there. The computational complexity of rendering a 40x30 Spinda image would therefore be 4800 times the complexity of whatever algorithm you use to determine the location of the dot. A simple center-of-mass algorithm is O(n) with respect to the number of pixels, so that works out to being O(n) with respect to the total number of pixels in the original image. A rendering algorithm that is O(n) with respect to the number of pixels on the screen is actually insanely fast for a video game. You should reach real-time rendering speed with no issues. You might even have enough computation left to reverse-engineer the PID of each Spinda you just rendered, if you really want to.
Since PIDs for Spinda face are literally the coordinates of the dots, then reverse-engineering is just displaying the coordinates you got as hex, taking pretty much no computing power.
@@BanD1t8 In that case, the algorithm would be just find the center of mass of each of the 4 sub-images, and from there you know the PID, so generate that Spinda.
I can't speak to actually rendering doom on spinda's face but I've been thinking about how we could encode the source code of doom on spinda. If all a spinda face does is encode a 32 bit unsigned integer we can turn those 32 bits back into a store of other information. According to a quick google search the original doom is about 2.39 megabytes or 2,390,000 bytes. As notes spinda encodes 32 bits which is 4 bytes so quick division suggests that one could store all the information in doom on 597,500 which is a totally reasonable number of spinda. I wonder what it would take to catch a Doom's worth of spinda. With some RNG manip and a server farm's worth of gameboys could you catch these spinda and store spinda in the boxes of some copies of sapphire? Bulbapedia tells me that one copy of saphire can store 420 pokemon in the PC ( plus 6 in the party I imagine) so with a very reasonable 1403 gameboys you could encode all of Doom's source code on spinda, ordered within your boxes and parties. Now actually catching them would be an insane challenge in its own right but should be atleast theoretically possible. But I wonder how long it would take. This was a fun video and the genetic algo is really cool, thanks for fun spinda thought experiments adef!
I believe you can add 2 Spinda to the Day care in addition to the 426 in boxes/the party, taking us down to a much more manageable 1397 copies of Sapphire. The save file also stores the last 50 teams* you beat the Champion with in the Hall of Fame option on the PC, allowing for up to 50x6 = 300 extra Spinda per cartridge for a total of 728, assuming you don't mind those 300 being released after entering the Hall of Fame to catch new ones (And beating the E4 + Champion 50 times with nothing but Spinda, of course). This takes us down to 821 copies of Sapphire, which is essentially just one copy and a few spares. *The HOF doesn't store all info on each Pokemon, but it does store the PID, which is all we need for this concept.
For anyone who wants to optimise, I think we could reduce the phase-space of Spinda patterns significantly. For a start it seems to be that although there are 4 billions unique personality values, it looks like there aren’t 4 billion unique designs. Sometimes one of the dots is entirely off the face of Spinda so won’t affect the pattern. I’d say, 10% of the time the top left dot is off Spinda‘s face, all of those patterns can be collapsed into one since they aren’t visually distinct. Similarly, overlapping dots may cause patterns to look identical. But by far the easiest would be to accept a lower resolution of dot placement. If you allow each hex digit to take only even values, you’ve halved the resolution at which you can place dots, but reduced the number of distinct values to consider to only 16.8m from 4b In fact, I reckon you could probably precompose around 256 different patterns showing a different density and pattern and you’d get a result comparable to the footage, but available muvh quicker.
I've never seen any youtube video talking about Spinda that actually incorporates how lots of Spinda patterns are identical due to the spot not being on the face
Might even be possible to narrow it down so each spindxel only has 10 options: Completely beige. "Completely" red. Red dots located on only one of the sides. (Up, left, down, right.) Red dots covering a diagonal half. (UL, UR, DL, DR.) Should only be slightly less readable than the result in the video, but much faster to process.
Considering that the hexadecimal represents coordinates, I feel like it would be more efficient to just rank the most important pixels within spinda's face's bounding box (based on brightness probably?) then convert that into coords, which can be directly converted into spinda hex.
Super cool and savvy thoughts. Some comments suggest narrowing down this number even further, though personally, I feel like it's in the spirit of Spinda to try and have as many different visual variants as possible. You're correct though that there's no need to replicate visually identical results. I don't really know my stuff, but with the above informaiton, would it be more or less crunchy for the system to 'preload' what Spinda pattern corresponds to a given possible configuration of pixels? Assuming the Doom footage already needs to be converted to black and white, and Spinda are already representing a small part of the screen (say, 64x64 pixels each), well - 64 x 64 is 4096, a fairly manageable number of different possibilities. Would it be more efficient to create a program which could pre-calculate which Spinda best fits each possible 64x64 pixel possibility, then use the results of that to perform a simple substitution for the Doom game itself?
there is NO way that after hearing about spinda for the first time ever i managed to not only imagine what a cute pattern would look like but also to HAVE THAT PATTERN BE YOUR FAVOURITE TOO. i just thought about pandas having dots on their eyes and then the symmetry about the two extra dots on their ears
The results were kind of a disaster, but the video’s so well put together that I learned a fair amount about programming and had a good refresher on hexadecimal values from college. Great video!
This video is my introduction to your channel, and I just want to thank you from the bottom of my heart for being one of the rare few to pronounce "pokémon" correctly.
I feel like using a genetic algorithm to turn each frame of gameplay into a spinda grid image isnt really a good idea. A spinda's face already encodes a x and y value for each one of its quadrants so you can probably make it act like a dot matrix display instead, so wouldnt a better idea would be to take the display data used to draw the frame instead of the image itself, and use some sort of transformation program to turn it into something that can be shown with the spinda display instead.
This video feels like it came out in 2011 and I mean that in the best and most flattering way possible. It's weirdly nostalgic in a way I can't explain.
Good lord, an evolutionary algorithm for picking out for individual spots in a mosaic pattern?! No wonder it took dozens of hours of computational time
if you let an infinite numbers of Spindas roam in an infinite room at random an infinite amount of times, eventually the spindas will form the entire walkthrough of Doom.
Idk if this has already been implemented, but I feel like it would reduce computation time by a lot if you had a set spinda for an “all white” or “all black” pixel and automatically used those for sections that are like 90% one color.
The real question is how long until Keizaron decides to play this version of Doom or maybe like Pokemon Red or Blue with the spinda tile display? Also I'm not a programmer myself, but, conceptually I would probably switch from genetic algorithms to some sort of AI that's pre-trained to minimize the visual loss function for the assigned pixels that a given spinda is supposed to replicate in the mosaic grid array. Maybe this would speed up the frame render times?
the suggestion has been made elsewhere that it's probably best to start precomposing a certain number of shades of spinda (say, 256, to work with 256 shade black and white) and just assigning them to matrix regions based on luminance instead of doing a genetic algorithm. Attempting to use any kind of AI here is really just a way to make the computer optimise itself with the task already being done, rather than a fundamentally different approach.
Two classic memes of running/animating things on things that generally aren't used for that purpose fills me with joy. Never would I have thought there would be a connection between Bad Apple and Doom, but I could not be happier to be proven wrong.
I'm only 3 minutes in and I've audibly laughed 3 times. This is hands down THE best channel on the platform. Everything from the scripting to the editing to the comedy to the whole subject is always a 10/10 on every adef video. This was well worth canceling lunch with my mom over.
Well you animated a doom clip with spinda patterns, but you did not play doom only using spinda patterns. Clickbait title tbh. You would not say I played doom on a sausage if you made a stop motion animation of doom using only sausages
lmao i cant believe my "can it run doom tho?" comment appeared on this, i totally forgot about the spinda animation thingy anyways, really nice video, didnt think it would be possible but here we are
oh, I loved this. not only was the premise intriguing, and the result immensely satisfying, the presentation was masterful. all adjectives aside, I adore your vibes -- easy sub.
the first thought that comes to mind for optimization is hashing your spindas; basically, for each sub image, you first check if you've already seen it before (or even just something close enough if you build the hash right), and if so just use that spinda that you've already spent the time calculating. all the frames of sub images that are made up of solid chunks of pure white or pure black come to mind, and a hash search is definitely quicker than your genetic algorithm so it's worth the little overhead. loved the video!
Amazing video! One thing i'd have done is to encode all pixels replaced by a single face to a int16 number (so 4x4 bits). Then, i'd map each number to a generated spinda if and only if it is not yet generated. That way, once you've found a pattern, you don't need to re-compute it Didn't you have a fitness function already
yeah this is definitely a display test and not a gameplay test, the video title is kinda misleading. I don't strictly think there's anything wrong with using doom footage as a display test, but the title should really be "I displayed DOOM using only spinda patterns" or something
Honestly this is how I feel a lot of the time when it comes to my “projects”, where I end up requesting so much help from others that it might as well not be my work at all. But, something to keep in mind is that without your desire, without your requesting, it still wouldn’t exist, so that has to count for something.
With this and Chatot's Chatter, it's theoretically possible to recreate any audiovisual piece of media on Gen IV Pokémon assets. Finally, the most unforgettable luncheon will return
Doom and Bad Apple have this special relationship as they have the shared goal of being played and displayed on every medium possible. Where Bad Apple goes, Doom is sure to follow closely behind.
I was thinking machine learning was going to be the only possible way to get this to run in real-time. Instead of running this genetic algorithm on each sub-image on each frame, you could frontload the training time for a function that maps from a general sub-image to a specific spinda pattern. Then at render, each sub-image could be passed to this function, which could much more quickly produce a consistent output. It might not get quiet in real-time, but with a GPU with tensor cores, it's probably super doable in real-time. The hard part with this approach though is obtaining the training set data, a set of predetermined successful maps of sub-image to spinda pattern. with what y'all have done, you have basically created a data set! Not sure if it's big enough already but it might be! . Using the work y'all have done, but taking it as a data set for a machine learning algorithm would dramatically cut down performance costs and might make this possible in real-time! I might try if I get around to it, but I have other projects demanding my time rn :/ leaving this here in case you/Jakob/anyone wants to tackle it! Probably would be a pretty nice intro to a computer vision project :)