The VR HEXBUG nano in Planet HEXBUG is equipped with built-in AI technology, to enable it to detect game elements and use that information to better navigate its virtual world. This data can be visualized and used in various ways within Planet HEXBUG Playground and game play.


How is this an example of Artificial Intelligence (AI) technology?

The built-in Artificial Intelligence (AI) technology in the VR nano enables it to detect objects and report attributes about them. Sensors, like a Distance Sensor, can detect an object and its location, but do not have the intelligence to report any information about that object. Whereas AI is able to not only detect the presence and location of an object, it can also use its intelligence to report what that object is, as well as other important attributes about it.

In Planet HEXBUG, the VR nano’s built-in AI has been pre-trained to be able to detect game objects, and tell the difference between them. For instance, the AI will detect and name ‘obstacles’, ‘enemies’, and ‘food’ as they come into a detectable range of the VR nano. The AI uses the detected size of the object to determine its distance from the VR nano, and continuously reports that information.


Forms of AI in the VR nano

The VR nano is equipped with two main forms of AI – smell and sight.

Screen_Shot_2021-12-03_at_12.12.11_PM.png

AI Smell

“Smell” is used to detect what is around the VR nano for 360 degrees, within a detectable smell radius of 800 millimeters (mm).

The VR nano can smell food and enemies and differentiate between the two. The smell radius is indicated by the yellow circle in the image to the left.

Screen_Shot_2021-12-03_at_12.12.58_PM.png

AI Sight

“Sight” is used to detect what is in front of the VR nano within a 40 degree field of view, and a range of 1000 millimeters (mm).

The VR nano can see food, enemies, obstacles, hazards, and home and differentiate between them. The AI sight will report more information about what it sees, like the distance and angle to food, or the health points of an enemy. (The field of vision is estimated with the yellow lines in the image to the left.)


Visualizing AI information in Planet HEXBUG

There are two ways to visualize the information the built-in AI is reporting within the Planet HEXBUG Playground window – the mini-map, and the AI visualization on the field of play.

The Mini-Map

Screen_Shot_2021-12-02_at_3.52.00_PM.png

The Mini-Map

When the mini-map is present in the Planet HEXBUG Playground window, it will show the VR nano’s relative position to the playable field and the objects its AI has identified.

The AI information visible on the mini-map includes the smell radius and field of vision, and the elements that can be sensed within those ranges.

Screen_Shot_2021-12-02_at_3.56.06_PM.png

Smell Radius

The yellow circle around the VR nano (as highlighted with the red arrow in this image) indicates the smell radius.

Food and enemies within this range can be sensed using AI smell.

Screen_Shot_2021-12-02_at_4.04.11_PM.png

Field of Vision

The gray translucent cone projected from the front of the VR nano (as highlighted with the red arrow in this image) indicates the field of vision, or where the VR nano can effectively “see”.

Game elements within this range can be seen, and more information about these objects will be displayed on the field of play.


AI Visualization

Screen_Shot_2021-12-02_at_4.12.25_PM.png

AI Visualization

The AI Visualization on the field of play can be turned on and off by selecting the button in the lower right corner of the Playground window.

When turned on, the AI information will highlight detected game elements, and display their name and relevant attributes, like distance or health points.

The information about attributes will only be displayed when elements are within the field of vision and 1000 mm sight range of the VR nano. When they are out of range, it will not be displayed.

Screen_Shot_2021-12-02_at_4.14.57_PM.png

Food is indicated by a glowing highlight and a ‘Food’ label.

The distance and angle to food is also displayed, and will change in real time as the VR nano moves around Planet HEXBUG.

enemy_info_callout.png

Enemies are indicated by a glowing highlight and an ‘Enemy’ label.

The distance and angle to the enemy is displayed, and will change in real time as the VR nano and the enemy move in relation to one another.

The level and health of the enemy is also displayed. The higher the level, the greater the health points of an enemy. The strength of the attack needed to defeat an enemy correlates to its level and health.

Screen_Shot_2021-12-02_at_4.26.06_PM.png

Obstacles are indicated by a glowing highlight and an ‘Obstacle’ label.

The distance to the obstacle is displayed, and will change in real time as the VR nano moves around Planet HEXBUG.


Using AI information in projects

The information from the VR nano’s built-in AI can be used in projects to help navigate to food, detect enemies, avoid obstacles and more. There are several ways that AI data can be used in a project. To get started, there are several Example Projects that make use of the VR nano’s AI to complete basic game tasks, like eating food or bringing it home. For more information about using Example Projects in Planet HEXBUG, see this article.

Screen_Shot_2021-12-02_at_4.33.14_PM.png

Finding Food Example Project

The Finding Food Example Project uses information from the built-in AI to get location information about food that is within the detectable range.

This information is then used with Drivetrain blocks to navigate the VR nano to the nearest food source, so that it can be eaten.

Open and test this example project to see how the AI information about sensing food can be used to earn experience points (XP). Iterate on this project to use AI information to collect more food or perform other actions.

Screen_Shot_2021-12-02_at_4.38.35_PM.png

Detecting and Fighting Enemies Example Project

The Detecting and Fighting Enemies Example Project uses information from the built-in AI to detect an enemy.

This information is used with Drivetrain and Action blocks to navigate the VR nano to the enemy and attack it using AI information about its health.

Open and test this example project to see how the AI information about sensing enemies can be used to earn experience points (XP). Iterate on this project to use AI information to defeat more enemies or perform other actions.

Screen_Shot_2021-12-02_at_4.41.27_PM.png

Avoiding Obstacles

The Avoiding Obstacles Example Project uses information from the built-in AI to detect obstacles in the path of the VR nano.

This information is then used with Drivetrain blocks to navigate the VR nano around the obstacle successfully.

Open and test this example project to see how the AI information about obstacles can be used to explore Planet HEXBUG more easily. Iterate on this project to use AI information to travel to new locations or perform other actions.

 

For more information, help, and tips, check out the many resources at VEX Professional Development Plus