Setting up a simple AI

Because Grunt makes decisions autonomously and mimics an intelligent creature, we can consider his programming to be an example of a simple AI. This means that Grunt is the smartest robot we have made so far!

Recall from the last chapter that the Timmyton's program consisted of one main switch that activated an operating mode based on the brick button that was pressed. Grunt's method is more sophisticated. In order to imitate autonomous decision making, Grunt's programming relies on a series of nested switches. Each switch monitors a different sensor. If the sensor detects that a pre-defined parameter is met, then the corresponding mode will activate; if not, then the program continues down the line and checks the next ...

Get Building Smart LEGO MINDSTORMS EV3 Robots now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.