🕛
Thursday / Oct 20th, 202210/20/2022

Challenges

Featured Challenge:
#174 — AppleSoft Basic Fractal Tree

Take a trip back in time and let's learn all about GR (graphics) and HGR (high resolution graphics) in AppleSoft BASIC on a restored Apple II+ computer! Can we render a fractal tree?

sep 12, 2022

AppleSoft Basic Fractal Tree

Filter by Language

Pick a language to filter

Filter by Topic

algorithm

Coding in the Cabana is a series where I attempt challenges from my garden cabana in Brooklyn, NY. In this episode, I animate the path of the classic "space filling curve" known as the Hilbert Curve.

Hilbert Curve

In this coding challenge, I implement the “Gift Wrapping algorithm” (aka Jarvis march) for calculating a convex hull in JavaScript. This is a foundational topic in computational geometry!

Gift Wrapping Algorithm

Let's try implementing a famously faster sorting algorithm: the Quicksort! And visualize the process with p5.js!

Quicksort Visualization

Yes, sorting numbers can be fun! In this challenge I attempt to implement the "bubble sort" algorithm in Processing (Java) and visualize the process itself with animated lines.

Bubble Sort Visualization

Visualizing the Barnsley Fern fractal with Processing (Java)!

Barnsley Fern

In this challenge, I use my JavaScript neural network library and a genetic algorithm to train an agent to play Flappy Bird.

Neuroevolution Flappy Bird

In this multi-part coding challenge, I create a system where autonomous steering agents evolve the behavior of eating food and avoiding poison.

Evolutionary Steering Behaviors

In this two part challenge, I implement the Breadth-First Search algorithm in JavaScript. My demo application is "6 Degrees of Kevin Bacon" (finding the closest relationship between Kevin Bacon and another actor).

Breadth-First Search

In this coding challenge, I attempt to create rose (rhodonea) curves using trigonometry function and polar coordinates.

Mathematical Rose Patterns

In this multi-part coding challenge, I attempt an implementation of the A* Pathfinding Algorithm to find the optimal path between two points in a 2D grid.

A* Pathfinding Algorithm

In Part 1 of this multi-part coding challenge, I introduce the classic computer science problem of the Traveling Salesperson (TSP) and discuss the pitfalls with a brute force solution. In Part 2, I discuss Lexicographic Ordering and demonstrate one algorithm to iterate over all the permutations of an array. In Part 3, I apply this algorithm to a brute-force solution of the TSP problem. Every single route permutation is checked one by one. In Part 4, I attempt to create a solution to the TSP problem with a genetic algorithm, and then I add a “crossover” algorithm in Part 5.

Traveling Salesperson

In this coding challenge, I continue one of my favorite subjects: Algorithmic botany! This video covers the subject of Phyllotaxis, what it is and how it can be used to generate sunflower-like patterns inspired by nature.

Phyllotaxis

In this coding challenge, I implement a "smart rockets" algorithm (based on a simulation by Jer Thorp).

Smart Rockets in p5.js

More algorithmic botany! Another way to generate a fractal tree is to consider every part of the tree an object, so that we can apply forces and attributes to all the branches and leaves and more!

Object-Oriented Fractal Trees