What if you played Game Boy Tetris, but every single pixel of the screen was also playing Tetris? Fractetris is a port of the original Game Boy Tetris (reimplemented in C from the community disassemblies — the real gravity tables, the real RNG with its weird reroll quirk, DAS timings and all) compiled to WebAssembly. You play it normally with the keyboard. But the screen you’re looking at is…
I got so mad at poke(rogue)like that I trained a RL agent to beat it for me What I said on the title. After hundreds of attempts I gave up and to try to salvage my sanity and not seem like a failure at an easier version of a kids game, I got to work. By the way, you can play the game on https://pokelike.xyz/ , it’s pretty cool! And Frustrating!! Reinforcement Learning seemed like a natural choice:…
I have always wanted to write an emulator from scratch. There is something deeply satisfying about implementing a CPU instruction by instruction until a real program starts running on your fake hardware. gb-ts is a Game Boy emulator written entirely in TypeScript that runs in the browser. It currently boots the Nintendo logo and can run some simple ROMs. The CPU , memory bus, PPU (pixel processing…
I wanted to see what a Bach fugue looks like when you can actually watch the voices weave around each other in real time. This is a 3D visualization of Bach’s Fugue No. 2 in C minor from the Well-Tempered Clavier. Each voice gets its own Kepler solid spinning in space, and the whole thing lights up with neon bloom whenever the fugue subject enters. The music plays from a MIDI file and the…
A small experiment running fragment shaders through WebAssembly in the browser. The idea was to see how far you can push pixel-level GPU computations in a web context without any heavy frameworks. Just raw shaders compiled to WASM and rendered straight to a canvas. You can try it here .
I have always been fascinated by the invisible web of references between the books I read. A while ago I fine-tuned a Roberta model to detect citations in free text, and it worked, but it was brittle and limited. This time I went all in: a full pipeline that uses LLMs to extract every citation from the raw text of a book, then resolves each one against Goodreads and Wikipedia to find the actual…
The nicest thing about being a developer is building stuff that is useful for yourself. I want to have instant feedback about my Japanese comprehension while reading manga, so I’m building an app that reads a manga page back to you in Japanese, using each character’s voice. Everything runs locally on my personal computer! The system mixes three different models and three modalities of data: A…
I had a very long flight 2 months ago and what better way to pass the time than practicing my japanese in my phone using a 100% internet-free local LLM? I selected Aya-expanse-8B for the journey, which quantized in 3 bits barely fits on my iPhone 16 Pro Max’s 8GB of shared memory! The model is able to talk in fluent japanese and even answer questions about grammar and correct my japanese on the…
How not to pay Adobe and process multiple photos with Python There is a very elegant technique to remove crowds from photos in which you just use a tripod and take multiple photos from the exact same spot. Every single picture might have tons of people, but every picture has people in different spots! So if you just average the pixels most of the crowd will just disappear. (Technically, the median…
A Toy Diffusion model you can run on your laptop It seems that it has become more and more common for niche new advancements in AI to break in to the mainstream media and to dazzle layman and practitioners alike with the amazing things one can achieve with Deep Learning. The latest such occasion was OpenAI’s amazing DALLE-2, the text to image model capable of generating an image for almost…
Training a RL agent to fish in Stardew Valley This is a project I have been grinding on and off for quite some time. I had never tried to mod a game and I had never succesfully trained a “ real” reinforcement learning agent (I gave up on Flappy Bird). The challenge for me was understanding exactly what was the “ state space” of my problem. When you code using some easy RL framework that gives you…
Fine-tuning Roberta to detect Citations between books Have you ever wondered about all the relations beetween all the books you’ve read? If the authors of your favorite books have read one another, or even if they have read the same people from before their time? Which books then were read by basically everyone? Well, it would be really hard to read and parse biographies (if they are availiable)…
Created: Jan 02, 2020 4:10 PM I’ve had a lot of free time in 2019 and so I managed to read 50 books or so by the end of the year. Here are short reviews of the one’s that impacted me the most among them. From Shakespeare plays, Sci-fi and Biographies to Fantasy :) I Hope they might interest some of you here! I’m trying to write better so please any constructive criticism on the writing or the…
Some preliminaries What follows is the story of someone using a ridiculously complex piece of technology just to make something goofy. The GPT-2 model, presented by OpenAI, was a game changer in AI generated text. So much so that the team behind the development of the model delayed it’s public release so people could prepare for a world were things like fake news could be generated effortlessly…
10 livros que me marcaram Queria muito voltar a escrever mas infelizmente falta tempo. Eu tenho várias ideias mas começar os textos tem sido um pouco difícil, então pensei, porque não fazer um tema fácil e aproveitar o impulso? Eu sempre vejo canais do Youtube, blogs e afins fazendo textos ou vídeos enumerando listas. O motivo do sucesso desses textos deve ser que eles são fáceis também de…