Category Archives: Uncategorized

Deep Learning Books Published!

Book pageMy deep learning books are published!

This book is for programmers, scientists, artists, engineers, physicians, musicians, and anyone else who wants to understand how deep learning works, and harness the tools for their own work.

The tone is friendly and informal. Rather than math, I used words and 1000 original illustrations to communicate the ideas. The book is appropriate for any hardware, programming language, or library you like. In order to give concrete examples, I provide 72 Jupyter notebooks full of Python code that demonstrate the ideas in the book, and create all of the computer-generated figures.

You can download Volume 1 or Volume 2 right now! They’re formatted for Kindle. Amazon offers a free Kindle reader for just about any device with a screen. I recommend reading the book on a color device, so you can get the most out of the color figures.

You can learn more about the book at https://dlbasics.com.

Typesetting Markdeep Output in InDesign

Book pageI love writing in Markdeep. It’s Markdown on steroids. I just wrote a whole book in Markdeep and loved it. Markdeep writes files for web browsers, and it works great for that.

When it was time to publish my book, it was important to me to have gorgeous typography, and manual control over where every figure was placed. Those qualities are hard to get out of a web browser. So I looked at professional layout tools, and chose Adobe’s InDesign.

This is a great program with a ton of features and capabilities, but I struggled for a few days to find a good workflow to get from Markdeep to InDesign. I eventually hit on a process that worked for me, and once I had it figured out, layout was a breeze. In this short document, I describe my workflow in case you want to do something similar.

Lovely Moments in Fallout 4

WARNING: This post contains extremely lightweight spoilers about Fallout 4. I describe a few clusters of objects that I wandered across, among the many thousands to be found. I won’t reveal anything about the game or characters beyond what’s on the TV ads.

In Fallout 4, you’re wandering Massachusetts after a nuclear war. The world is essentially depopulated except for a few bands of survivors. As you explore the abandoned cities and buildings, there are endless everyday objects lying around that scavengers haven’t yet claimed: broken coffee pots, empty cans, plastic forks, and so on. Most of this stuff is broken junk; you can scavenge it or ignore it.

Every now and then I a bunch of junk suddenly snaps together into a story for me. I think that these are deliberately staged still lifes, and they’re lovely. It’s simply wonderful to be running around an abandoned environment, and stumble into a poignant moment in the midst of dust and ruin. Here are three of my favorites so far:

* A nursery. Four cribs, empty. A changing table, piled with blankets. Against one wall, facing the cribs, a chair. Next to the chair, a low table. On the table, an ashtray. And next to it, a bottle of whiskey. And a shot glass.

* A bathroom. On the floor, in front of a sink, are the skeletal remains of a right hand. And a left hand. And lying between them, a pair of handcuffs.

* A hotel room. A man in decaying clothes is lying on a bed. His skeletal right arm is falling off the bed, the bones of his right hand resting on the floor. Next to his hand, a syringe with the last bits of a psychoactive drug. Next to him on the bed, a female mannequin. She is naked, her plastic legs still attached to her wide circular base in a standing pose. But he’s placed her lying on the bed next to him, face up. His left arm is wrapped around her.

These are just a few of the beautiful still lifes I’ve discovered. I’m very impressed by the skill with which these were assembled, they depth of the stories they communicate so eloquently, and the casual way they were included as tiny and unremarkable details in the midst of an enormous game. It would be very easy to miss these scenes, or just move past them quickly. But each time I find one of these gems, I see a glimpse of the long-gone person behind the objects, and a moment from their story. It’s beautifully done.

A Practical Replacement for Modulo

wrapx1The modulo operator % is great when everything is positive. But when your input value goes negative, the values it returns can be a big surprise.

For example, suppose you have a car going around a 3-mile racetrack. The position of the car is computed by some complicated program, but you get back a floating-point value I’ll call a that tells you how many miles the car has driven after passing the starting line. Because the car can take some warm-up laps before the race begins, you can also have negative values of a, meaning that you have that much distance to travel before the race begins. But the car is still always on the track, so you still need to turn both positive and negative values of a into positions on the track between 0 and 3.

When a>0, then a % 3 is always a number between 0 and 3, and our work is done. But if a is negative, watch out! The result of -1 % 3 is -1. And -4 % 3 is also -1. And -5 % 3 is -2. Though making modulo work this way gives it some nice formal properties, these results can be a real hassle in practice. Here’s how to fix things up.

Continue reading

Adapt or Adjust

difficulty meterIn a previous post, I complained that a game I was playing should have adapted the difficulty level of a mission after I’d failed it many times. I know, of course, that building in such smarts would require significant effort. I was wondering about how to make the process easier, and then I realized we already have the answer: the difficulty setting. That’s the slider or check boxes we often see at the start of a game that ask us if we want it set to “easy,” “medium,” or “hard.”

I have publicly opposed the idea of a difficulty setting several times. But now I realize that my objections weren’t to the concept itself, but to how and when it was presented. I believe now that a freely-adjustable difficulty setting is an elegant and simple mechanism for preventing the kind of frustration I was experiencing. I now think that a difficulty setting, handled properly, is a very good idea.

Continue reading

I Paid My Money, Why Won’t You Let Me Have Fun?

sad_face“Hello, player! You’ve failed at finishing this task within our time limit ten times in a row now. Are you still having fun? If yes, press A and keep trying. Otherwise, press B and we’ll remove the time limit. Or press X just to mark this as done and move on in the game.”

Adaptation and respect for a player’s individual abilities should be part of every single game. That includes games with time-limited goals. Those time limits are selected and tuned to provide a challenge to some class of players. If you’re outside that class, that arbitrary limit should not present an insurmountable obstacle that ends all pleasure and progress in the game. Sadly, I’m playing an otherwise wonderful game that requires me to do something I can’t seem to accomplish in the given time. The result is that the game is over for me, since this mission is mandatory to continuing the story. The game has ruined itself.

Continue reading

“Bait” Published!

Bait-A-Novel-KindleWoo-hoo! My third novel, Bait, is now available on Amazon! Head on over and read the first few chapters for free!

Bait is a smart, funny book set in contemporary California.

Doreen has a problem. The man she loves is sick and getting worse every day. So she does what anyone would to: she turns to a set of ancient bracelets that claim to heal and protect one person by sucking the life force out of other people.

Doreen’s targets are Jason, an ex-Olympic diver now performing at a run-down theme park, Lucy, a struggling actress who’s just landed a starring role in a terrible play, and Sammy, a small-time con man who has accidentally become a City Councilman.

Smart characters, snappy dialog, an inflatable security guard, hungry sharks, and a pair of overly well-matched twins populate this goofy but warm story of love, jewelry, finding self-confidence, and just desserts.

Globs

globGalleryI’ve cooked up a cool new 2D geometric primitive. I call it a glob. The idea is that we can join any two circles with a smooth, curvy, controllable neck.

I’ll be making globs a part of my AU Library for Processing very soon. In the meantime, you can read all about them here. At the bottom of that page there’s an interactive demo where you can make your own globs!

Making Loops, Part 1

time graphI’ve been making and sharing animated loops on my Tumblr for a while now, and I’ve received some questions about how I make them.

One of the most common questions involves how to get lots of moving objects to seamlessly loop, even though they’re all entering and exiting at different times and going different speeds. There are lots of tricks and techniques for doing this. Here’s one of the most basic, but still very flexible and powerful.

Continue reading