Power in Miniature: Algorithmic Tools in an AI World

(If you just want to see the code in action, jump down to the bottom).

 

Abstract representation of artificial intelligence, data, and computing.

What is AI? What purpose does it serve? We may not know but we still answer.

 

This post is shorter than I intended it to be, because I kept wrestling with it and in the end decided that for this, written is better than unwritten.

Several subtopics get missed, therefore, but hopefully it contains points of relevance.

The Problem

In today’s AI-fueled, quickly evolving, incredibly advancing world, what you know about AI one day is old hat the next, and factually incorrect by the third.

Such a fast-paced nature makes it hard to stay on top, much less catch up, but as the impressive number of at least semi-successful AI startups indicates, it’s still worth the effort, and all you really need to do is get your foot in the door (and maybe find a little luck too).

 

The Solution?

So what is the “key” to mastering AI? How do you get to be on top of the game?

Is it understanding the fundamentals, like going through the keystone deep learning courses and gaining technical mastery of the core subject?

Is it being able to expertly prompt AI tools to output the perfect results?

Is it something else?

 

I’ll tell you: It doesn’t matter.

 

As always, in any field, success is based on your definition of it. So if your goal is a six-figure job, and doing a silly thing like prompt “engineering” gets you there, who cares what other people think? And if you just want to maintain relevance and present a tech-forward appeal, then you can write a course, a blog (heh), or a book about it — and if it gets eclipsed next year, month, or week, does it matter?

Success in the field of AI is as subject to change as the field itself, and so it is up to us to find our niches, if we want them.

 

But there remains another goal, an internal, self-defined goal, which applies to any tool as much as it applies to AI: to gain an understanding adequate enough to use the tool, rather than be used by it.

This is true for AI; it was true for big data; it was true for web APIs; it was true for Web 1.0; it was true for the nascent Internet; it was true for personal computing and for telephones and telegraphs and semaphores (the original, visual kind) and calculus and geometry and paved roads and chariots and smoke signals and forged alloys and bows and arrows and probably fire, when that was first released to the public.

 

You either learn it well enough to control it, or you fall under its power, wielded by others, sometimes without even knowing how or why.

 

And from the first Paleolithic hominid to burn his meat with fire and release its fuel and thereby gain more energy than his neighbor and overcome him in the fight of survival, the human line has fought an arms race of mastery. AI is just one more step in this ongoing challenge.

 

So, yes, it probably pays to understand AI well enough to use it, even if you never do.

 

*  *  *

 

I will abruptly change direction now, for a moment. AI isn’t everything.

 

What do you actually need to know?

What do you need to know, in order to meet your goals, to win this “arms race,” at least enough to be self-sufficient in the face of evolving criteria?

 

You need to know a) what AI is, exactly; meaning, what it isn’t, and, corollary, b) how and when AI applies. Only then can you leverage c) how to actually use AI technically.

My point here is this: AI is a powerful, broad, and multicapable tool. But trying to do everything with AI is like trying to ride a bike with blockchain: unless you’re selling a book about it, it’s worse than unhelpful.

 

*  *  *

 

Possessing a fully applicable set of tools is as relevant to coding as it is to welding. Ignoring AI or crypto or whatever else because it is currently “gimicky” is equally as damaging as going all in with AI on the ground floor and letting it make decisions for you and spend money for you and so on.

Having knowledge of how and when and why to use each tool proves best, as it always has; this isn’t me telling you this, it’s an observation as old as time, and we all know it even if we sometimes ignore it or forget it. But if we remember in time, then we put the effort in to adding the next tool to our kit.

So, back to the main point: AI is a powerful tool worth learning to control. But it doesn’t fit all settings. So what else do you need? Well, everything you learned in college, or coding bootcamp, or wherever you picked up some coding skills. Most of it’s relevant at one point or another, if you keep your eyes open, and always depending on your goals. The challenge is to avoid using the hammer to make everything a nail.

You probably already have a pretty full toolkit, maybe fuller than you usually give yourself credit for, because you don’t remind yourself just how much you’ve picked up over time, and just how easy it can be to apply lessons from one domain to another. But it’s there, in your head, waiting for you to use it.

 

*  *  *

 

Here are examples of just one item that has kept it’s relevancy into the day of AI. The Markov chain — you’ve probably heard of it, or seen it in code, maybe even used it. It’s a fundamentally straightforward algorithm, relevant to a handful of particular applications. But it has some key use cases — in finance, biology, even gaming — that aren’t likely to completely disappear even as AI sticks its head in the door to all these domains. Small tools, after all, are often faster, easier, more lightweight, and more configurable than bigger ones; this goes all the more so for AI which inherently proves difficult to corral.

 

Well, enough discourse. Here is the code for a a handful of small examples in different setups for the use of Markov chains. They’re not the most practical examples, but they’re visual and expressive, and so hopefully demonstrate the continuing relevance of small tools and straightforward but powerful algorithms even in a world increasingly driven by AI.

Demonstrations

Small Python (Flask) web app, generating randomized sayings:

https://github.com/chaimedes/demonstrative-markov

A similar text-generation demo, only in plain Javascript, as a JSFiddle:

https://jsfiddle.net/__mber/vxzad27n/162/

An interesting use of Markov to create images (this isn’t mine, but I love it, you could do a lot with it):

https://jonnoftw.github.io/2017/01/18/markov-chain-image-generation

 

 

Postscript: At the end of writing I realize I included only one concrete example of “small but powerful.” Well, if you read this far, here are some others:

  • A* (not the black hole)
  • Dijkstra’s algorithm
  • FFT
  • Reduction
  • Memoization (more a tool than an algorithm, but required by so many).
  • Linear regression (yes, it’s part of much of AI; it stands on its own, too).
  • Probably many, many others I’m not thinking of or don’t even know.

Post-Postscript: It occurs to me that something like diffusion is an “algorithmic tool” by a broad definition. But we call it AI, so it seems a justifiable difference, and I like the title the way it is, so I’m leaving it.

Leave a Reply

Your email address will not be published. Required fields are marked *