Author Archives: Andrew Glassner

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.

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

“Freaks of Nurture” Published!

Freaks-of-NurtureHooray! My second novel, Freaks of Nurture, is now available on Amazon! Head on over and read the first few chapters for free!

Freaks of Nurture is a fast, funny story with an engaging cast of characters who do their best in weird but comic circumstances.

Dr. Susan Seligman has grown her little walk-in psychotherapy clinic in Seattle into a prospering business. But just as her most important funding sponsor is carrying out a site visit, many of her clients report that someone is reading their minds. When some of her own staff wrap the clinic rooms in tinfoil, things unravel quickly.

Meanwhile, in the building behind the clinic, three brilliant but oddball college students are working in secret to find the source of consciousness. They’ve concocted a mad scientist’s wet dream of a machine to enable them to look into another person’s head. Of course, they don’t know that every test of their gadget is beaming right into the clinic next door, affecting everyone there and causing havoc.

Freaks of Nurture tells the funny story of these two groups of people, both earnest but weird, independently struggling with the mysteries of romance, consciousness, power, and accidental pharmacology.