How AI make decisions


— How does an AI make decisions?

By Jonathan Tan, PhD candidate, Western University

About the game:

This game aims to teach the applicability of decision trees to classify a data set. The game’s basic premise is to place puzzle pieces on a grid to form a network. This network connects the left side of the game screen, where the data set lies, with the robots. Once the player finishes creating their network, they click the green Start button in the top-right corner, which begins with an animation of the data set’s items flowing through the network.

You can access the game at:

There are three main types of pieces: 1×1 straight and corner pipes, decision nodes, and robots. The player drags and drops these pieces from the top part of the game screen onto the grid. For 1×1 pieces, the player right-clicks (or presses R) while dragging the piece to rotate it 90 degrees.

The decision nodes accept input from the left and check the input against the condition that is printed on the node. If the input satisfies the condition, it exits through the top. Otherwise, it exists through the bottom.

The robots are the goal nodes of the game. Each named robot will award the player one point if it receives an item it likes and remove one point if it receives an item it doesn’t like. Exactly which items each robot likes is hidden from the player. Through trial and error, the player must deduce which features each robot is looking for and customize their network accordingly. Once the player reaches a certain score threshold, the level will end.

The current version of the app features two levels:

  1. In the first level (see image above), the player must sort through different types of coins. The level starts with a solution already present on the grid. Although this solution needs to be corrected, it should give the player some idea of the game’s objective.
  2. In the second level (see image below), the player must sort different images of fruits and vegetables.

The idea is that the educator can customize the game.

The educator can modify the size of the grid, the elements in the data set and their features, the decision nodes the player can use, the robot goal nodes, and the threshold of correct classification for a level. This allows the app to be used for a variety of purposes over a variety of disciplines.

Examples might be classifying images of fauna, historical figures and events, numbers, or other mathematical concepts.

Extensions to the app could also allow the player to type in the behaviour of each node (interpreted by a language model, for instance) or use the network to control a robot, with the inputs being the inputs the robot would perceive.