Artificial Intelligence

The AI is an addon that implements artificial intelligence for object instances on both Construct 2 and Construct 3. 

This allows the implementation of bots in games, which simulates player-like behaviors.

The intelligence percentage of the game bot is adjustable, so you can set the difficulty.

It supports procedural learning, so your enemies can learn as it plays. It's a set of complete and mathematically balanced artificial intelligence algorithms, designed from scratch for Construct's architecture, hence very full-packed, efficient and most especially, blazing fast.

The best benefit for this addon is that it supports all editors and runtimes of Construct. Both, Construct 2 and Construct 3.

It implements artificial intelligence for object instances, useful for game application bots and artificially intelligent object instances.

Intstructions

1. The first step is to add the AI into an object in the project.

2. These steps are explained below. For more information, visit the Construct 3 Manual's behavior reference.

3. Do this by creating a world object (instance based), an object that is interactive with the layout, for example the Sprite object.

4. Select the object instance, then from the properties bar, click Edit Behaviors.

5. Once the dialog pops up, press the Add new behavior button.

6. A behaviors list dialog popup will show, with the list of available behaviors compatible with the currently selected object. If installed properly, the AI behavior will be on that list.

7. Press add or double-click on the behavior, then it'll be added to the object's behavior list.

8. Finally, set the other plugin properties. 

  • Intelligence - is a percentage value from 0 to 100. It determines the intelligence of an instance or accuracy in making decisions. 
    An instance's decision accuracy varies from 
    ​​its intelligence.

You may refer to the Properties Section to learn more about the properties here.

 
 

Features

The AI is a behavior addon that implements instance based artificial intelligence features into objects on an application made by Construct 2 or Construct 3. It's easy to use, efficient, light and especially fast, with a few easy sample projects, test project and a complete fight bot game demo.

It allows you to easily apply player-like artificial intelligence for your game application, useful for game bot designing. It also supports procedural learning and artificial thinking based features using predefined behaviors.

This is made possible through the set of customized algorithms, which are light and efficient, hence blazing fast, designed from scratch for Construct 3 and Construct 2's architecture, especially for the c3runtime.

All mathematically balanced with complete support processing tools.
 

The intelligence algorithms created from scratch for the AI addon are so efficient, that it's scalable to thousands of instances with thousands of intelligence decisions.

It's an ideal artificial intelligence behavior addon for Construct 3 and Construct 2 projects.

Features :

  • Per instance based artificial intelligence for game bots implementation.

  • Intelligence Report Decision Type, and

  • Option Decision Type

  • Percentage, Scale, Highest and Lowest decision methods.

  • Direct or Inverse bias of values on reports for Intelligence Report Decisions.

  • Decision Reading and Processing Tools.

  • Easy to use and no programming required.

  • Well-supported and fully tested.

  • Function based design of decision-thinking event making.

  • Expression based decision making support.

  • Light, efficient and blazing fast artificial intelligence algorithms.

  • Adjustable instance intelligence.

  • Artificial Intelligence Tools for additional data flipping & comparison.

  • Mathematically balanced algo.

  • Complete data retrieval, checking, processing and reading of data using Conditions and Expressions.

  • Full documentation and tutorial.

  • Construct 2 editor support.

  • Construct 3 editor support.

  • Construct 2 runtime.

  • Construct 3 runtime.

  • Forwards compatibility support.

  • Runtime maintenance support.

 

Actions, Conditions & Expressions

Actions

Actions.png

Decision Making :

  • Decide - Make a decision, results are outputted on the expressions "CurrentDecision" and "CurrentDecisionVal".

    • Name - The name of the decision.

  • Create Decision - Create the blueprint of the decision, with the algorithm and method value to be used.

    • Name - The name of the decision.

    • Decision Type - The decision type in which the AI algorithm is run, either an Intelligence Report Decision or an Option Decision.

    • Decision Method - The value in which is to be interpreted and used. "Percentage" is preferable since it's scalable.

  • Set Intelligence - Set the object instance's intelligence. From '0' of absolute randomess, to '100' of absolute accuracy.

    • Percentage - Numerical value from '0' to '100', representing a percentage.

Option Decision :

  • Set Option - Add or overwrite an option into the specified option decision's options list.

    • Decision Name - The name of the option decision.

    • Option Name - The name of the option.

    • Value - The value of the option.

  • Remove Option - Remove an option from the specified option decision's options list.

    • Decision Name - The name of the option decision.

    • Option Name - The name of the option.


Intel Report Decision :

  • Set Report - Add or overwrite a report into the specified intelligence report decision's reports list.

    • Decision Name - The name of the intelligence report decision.

    • Report Name - The name of the report.

    • Value - The value of the report factor.

    • Bias - The feedback of the value towards the AI algorithm. Whether it's positive or negative.

  • Remove Report - Remove a report from the specified intelligence report decision's reports list.

    • Decision Name - The name of the intelligence report decision.

    • Option Name - The name of the report.

Conditions

Decision Making :

  • On Decision - Triggers when the specified decision is fired.

    • Decision Name - The name of the decision.

  • On Any Decision - Triggers when a decision is fired.

  • Is Decision Type - Check whether it is an "Intelligence Report Decision" or an "Option Decision".

    • Decision Type - Select the decision type to check.

Option Decision :

  • Is Selected - Check the name of the currently selected option.

    • Option Name - The name of the option on the current option decision.

  • Compare Value - Compares the data of an option from the current option decision.

    • Option Name - The name of the option on the current option decision.

    • Option Data - The data of the option to compare.

    • Comparison - Select the way to compare the values.

    • Value - Enter the value to be compared.

  • For Each Option - Loops through all the options from the current option decision.

    • Decision Name - The name of the option decision.

Intel Report Decision :

  • Compare Intel Percentage - Compares the intelligence percentage concluded from the current intelligence report decision gathered from the reports.

    • Comparison - Select the way to compare the values.

    • Value - Enter the value to be compared.

  • Compare Report - Compares the data of a report from the current intelligence report decision.

    • Report Name - The name of the report.

    • Report Data - The data of the report to compare.

    • Comparison - Select the way to compare the values.

    • Value - Enter the value to be compared.

  • For Each Report - Loops through all the reports from the current intelligence report decision.

    • Decision Name - The name of the decision.

  • Is Smart Decision - Checks if the current concluded intelligence report is a smart decision based on the gathered reports. Less than 50 is non-smart, greater than 50 is smart and exact 50 is undecided.

    • Analysis - The analysis to compare. Less than 50 is non-smart, greater than 50 is smart and exact 50 is undecided.

  • Is Positive Report - Checks if the specified report of the current concluded intelligence report is a positive feedback.

    • Report Name - The name of the report.

Expressions

Decision Making :

  • Decide - Call for a decision, while also returning the current decision value. Returns the 'selected option' for an option decision or the 'intelligence percentage' for an intelligence report decision. Empty ("") if none.

    • DecisionName - The name of the decision.

  • Intelligence - Returns the intelligence of the object instance. A percentage value from 0 (random) to 100 (accurate).

  • CurDecision - Returns the current decision name from the recent Decision action or expression call. Empty ("") if none.

  • CurDecisionVal - Returns the current decision value. Returns the 'selected option' for an option decision or the 'intelligence percentage' for an intelligence report decision. Empty ("") if none.

  • DecisionType - Returns the decision type of the specified decision. Either "Report" or "Option". Empty ("") if none.

    • DecisionName - The name of the decision.

  • DecisionMethod - Returns the decision method of the specified decision. Either "Percentage", "Scale", "Highest" or "Lowest". Empty ("") if none.

    • DecisionName - The name of the decision.

Option Decision :

  • SelectedOption - Returns the selected option from the recent option decision call of the specified option decision. Empty ("") if none.

    • DecisionName - The name of the option decision.

  • LoopOptionName - Returns the current option name from the "For Each Option" loop.

  • OptionPerceivedValue - Returns the perceived value of the option after applying the intelligence algorithm. (-1) if none.

    • DecisionName - The name of the option decision.

    • OptionName - The name of the option.


Intel Report Decision :

  • IntelDecisionPercentage - Returns the output intelligence percentage of an intelligence report decision, based on the decision analysis. (-1) if none.

    • DecisionName - The name of the intelligence report decision.

  • LoopReportName - Returns the current report name from the "For Each Report" loop.

  • ReportBias - Returns the feedback bias of the report, either "Direct" meaning positive or "Inverse" meaning negative. Empty ("") if none.

    • DecisionName - The name of the intelligence report decision.

    • ReportName - The name of the report.


Option Decision : Advanced :

  • OptionRank - Returns the rank of an option after the decision is made, starts from 0 (which is the selected option). (-1) if none.

    • DecisionName - The name of the option decision.

    • OptionName - The name of the option.

  • OptionPerceivedIntelligence - Returns the perceived intelligence percentage of the option after applying the intelligence algorithm. (-1) if none.

    • DecisionName - The name of the option decision.

    • OptionName - The name of the option.

  • OptionOriginalValue - Returns the option's value before applying the intelligence algorithm. (-1) empty if none.

    • DecisionName - The name of the option decision.

    • OptionName - The name of the option.

  • OptionDecisionMedian - Returns the option decision's median after applying the intelligence algorithm. (-1) if none.

    • DecisionName - The name of the option decision.


Intel Report Decision : Advanced :

  • ReportPerceivedValue - Returns the perceived value of the report after applying the intelligence algorithm. (-1) if none.

    • DecisionName - The name of the intelligence report decision.

    • ReportName - The name of the report.

  • ReportPerceivedIntelligence - Returns the perceived intelligence of the report after applying the intelligence algorithm. (-1) if none.

    • DecisionName - The name of the intelligence report decision.

    • ReportName - The name of the report.

  • ReportOriginalValue - Returns the report's value before applying the intelligence algorthm. (-1) if none.

    • DecisionName - The name of the intelligence report decision.

    • ReportName - The name of the report.

  • ReportDecisionMedian - Returns the intelligence report decision's median after applying the intelligence algorithm. (-1) if none.

    • DecisionName - The name of the intelligence report decision.


Tools :

  • ComparePercentage - Returns the resulting comparison percentage of 2 opposing values, the first value being the base of comparison.

    • CompareFrom - The percentage to compare the value from. From 0 to 100.

    • CompareTo - The percentage to compare the value to. From 0 to 100.

  • InversePercentage - Returns the inverse value of the percentage. Example, 100 would return as 0.

    • Percentage - The percentage to inverse.

Properties

  • Intelligence - Intelligence percentage of the object instance. Value from '0' to '100', from random to accurate.

 

Feature Showcase

The AI addon has a game demo project that shows how the addon is used. This project shows how to program a bot for your game, that can adapt to a player's behavior while having its own behavior as well.

Fight Bot - AI Implementation

The Artificial Intelligence addon demo project is a 1 v 1 archery game. It consists of the Player, which is the blue circle fighter and the AI Bot, which is the red circle fighter.

Programming a bot for this type of game, requires sensors and behaviors, which can be done by various ways using the built-in features and events. 


The hardest task in the game bot design process, is the processing of the sensor and behavior's raw data. This is where the AI addon comes in, by inputting the collected data and using the outputs to develop procedural scenarios, you can make a great working game bot with intelligent player-like features efficiently.

The intelligent result is achieved by the addon through making the decisions for the bot instance, and what's left for the game developer is just to setup the sensors and program the scenarios of the output data.

Usually, without AI the addon, this process would take thousands of events. With it, this can be done as little as 10 events, depending on the amount of sensors and the complexity of the behaviors and scenarios.

Artificial intelligence is in theory, self sustaining, ideally if properly done, the more factors inputted, the more intelligent, responsive and adaptive the instance becomes. And at some point, even one (1) flawed factor would be negligible and eventually the instance becoming self-reliant.

The AI addon allows easy implementation of player-like game bot features into game applications efficiently with less events and optimally fast.

You can check out the demo project yourself, click here.

 

Performance Rating

The AI addon is light, efficient, full packed and blazing fast. It's tested effective and performant, even on low-end devices. A complete game demo with around 100+ decision factors, only used 0.2% of CPU usage.

And 0.8% to 1.0% of CPU usage when 6x throttled, every tick!

Hence, very efficient for large projects, for all target platforms and devices.

Fight Bot - Demo CPU Utilization

The complete project of the Fight Bot, only allocates about 0.2 % of the CPU on the c3runtime with worker mode.

Fight Bot - Demo CPU Utilization

The complete project of the Fight Bot, only allocates about 0.2 % of the CPU on c2runtime on the Construct 2 Editor.

Game Demo Project - Throttle Test

Normal - 0.2 % CPU usage

6x Throttled - 1.0 % CPU usage

Throttling the browser's performance 6 times, also only increased from 0.2% to 1.0% CPU usage, which barely had any performance impact.

This AI addon feature should also work great on low end devices, mobile and consoles.

 

Introduction Tutorial

For learning purposes, it's recommend to read the introduction tutorial to easily and quickly grasp the concept of the Artificial Intelligence addon's decision-making based intelligence algorithm.

 
 
 

The Self Function addon implements functions on objects, for easy instance calls and classing. 
It's recommended to use with the AI addon or any general use cases, in this case creating the features of an object, the ideal and optimal way.

Self Function

Game Demo Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Easy Sample Projects

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Intelligence Report Decision

Option Decision

Supporters

Only

AI Test Project

Sample Setup Project

Specifications

  • Instructions - The sample project has comments and instructions on how to use the addon and its features.

  • A.C.E. Coverage - It covers the implementation of each action, condition and expression.

  • Tips and Tricks - It provides some tips and tricks to a better use of the addon and of the event-sheet system alongside it.

Supporters

Only

Get the tools

for your pro games!

Constuct Master Collection - Itch.io
Constuct Master Collection - Discord
Constuct Master Collection - Construct 3

© Construct Master Collection 2020 • All rights reserved

Contact Information: