Machine Learning AIs in Complex Examples
Let's use a more complex example than our simple 'is the coffee too hot' detector.
We're going to take that concept much further and create a smart coffee machine.
It has a much larger set of inputs and outputs, and looks like this…
Where Rules-Based AI Fails
Humans have a hard time when there are lots of variables involved in a solution. If there's just two - such as how strong each person likes their coffee, it's pretty easy to figure out and you could build a neat little table showing that information.
But when there are several variables - how much milk do they like in their coffee given the hour of the day, the temperature outside, and how recently they last had a cup - it becomes extremely complex. You can't draw a four-dimensional graph to solve the problem.
Learning AI to the Rescue
Machine learning AI algorithms deal with complex variable interactions easily. As long as you can provide the feedback the system needs to let it know it's doing a good job, it can learn and adapt.
By merging all of these inputs together, the smart coffee machine can figure out that…
- User A likes strong black coffee when it's early in the morning, but switches to decaffeinated in the afternoons.
- User B wants their coffee piping hot on cold days, but prefers to have it cooler when it's warm outside.
- User C likes a unsweetened latte, unless it's a cold evening - then they'll have a cappuccino with one sugar.
The more inputs you add, the smarter the system becomes.
- Add a Bluetooth link to your smart-watch, and the machine will give you decaf when you're stressed or have a high heart-rate, and an extra kick of caffeine when you didn't get much sleep last night.
- Add a microphone and it can add an extra bit of espresso when the kids are being loud.
The more complexity you add, the smarter your AI appears to become, as it learns how to respond to specific combinations of input and output. However, adding complexity also might mean you need more training data, or have quite a bit of refinement to do.
Feedback and Refinement
The key to being able to make these smart decisions is your training data, and in almost all cases your AI is going to need refinement and feedback.
Refining your AI is the process of finding out those times it's done the wrong thing or reached the wrong conclusion, and correcting it. You make corrections by adding additional training data.
In our coffee machine example, the best way to get feedback would be for our machine to use the AI to predict what a particular person wants. When the user steps up to the machine, it beeps and predicts their coffee settings.
If they then change those settings, we obviously guessed wrong. When they make their coffee, we capture the details of the coffee and all of the inputs. That information gets added to the AI training data.
This way, the AI evolves with new information - we get a stream of new combinations of input-and-output whenever we are incorrect, which is used to re-train, refine and improve the results of the AI.
Taking your First Steps
Now that you've discovered what a machine learning AI is, isn't it about time you created one?