Artificial Intelligence – Scratch Wiki

Artificial Intelligence, commonly abbreviated by AI, is the name given to a computerized mind that consists entirely of programming code.[1]

Its usage in Scratch is most common in projects in which a user can play a game against the computer.

An optimal AI will need an indefinite amount of If () Then, Else blocks, loops, and/or time, so that an AI has a response to every action that the player does and/or time to examine every possible outcome. However, this is impossible to program.

Most projects that use AI use special techniques, such as using variables to store different values. Those values may be previous locations, user input, and so on. They help to calculate different actions that allow the computer to make a good challenge to the player, and succeed in its task.

A practical and optimal AI will use recursion to try to adapt to the circumstances itself. Given:

A recursive function to return the best move for a player given a board and which player can be written under the following logic:

See this project for an example of strategic artificial intelligence

See the article on game trees for more on recursive functions and their use in constructing AI.

There is also another class of AI that depends solely upon only one of the factors. Such AI are a lot simpler and, in many cases, effective. However, they have not fulfilled the true requirements of an AI. For example, in the project Agent White, the AI moves along a given path and only tries to shoot at you. In this AI, only the user's position matters to the AI; it will rotate so that its gun turns towards the user. In the project Broomsticks, the AI only changes its position with respect to the ball.

AI which can take external stimulus and decide upon the best way to use it is called a learning AI, or an AI that uses something called machine learning. Neural networks are also commonly used for learning AIs. A learning AI is able to learn off of its present and past experiences. One popular way of making a learning AI is by using a neural network. Another is by making a list of things and creating a list of things for every reply (which can be done in Scratch, although with some difficulty as 2D arrays are not easily implemented).

Another type of AI is used in a remix of Agent White found here. In this remix, the AI picks a random path and follows it. It uses Math and future x and y positions based on the current position of a character which you control. Then it slowly moves toward that new position until it either reaches its destination or hits a wall. In this case, instead of Artificial Intelligence, it is more of Artificial Random because it never uses intelligence other than running into walls.

One of the biggest limitations AI has been facing is speed. Scratch is a rather slow programming language; hence most AI on Scratch are slow because their scripts are too long. Complications also have been a major problem for AI as all AI programs are very large and complicated, thus the scripts may become long and too laggy to script without crashing Scratch. For example, a simple game of Tic-Tac-Toe with AI will have a script running into multiple pages due to many conditions in If blocks, and sometimes in an attempt to speed it up by making it Single Frame. The complicated script also makes remixing a problem. Because of all this, most AI projects have no improvements, causing the AI to remain glitchy.

These projects have been using AI in the truest sense possible practically:

See the article here:

Artificial Intelligence - Scratch Wiki

Related Posts

Comments are closed.