My algorithm was pretty similar to yours I’m guessing. (See my other long post here.) I described mine to a friend one time and he called it “toothpick AI”.