Please enable JavaScript to use CodeHS

Introduction to Artificial Intelligence

Description

In this lesson, students learn how Artificial Intelligence is used to enhance gaming systems.

Objective

Students will be able to:

  • Explain how Artificial Intelligence is used in gaming
  • Identify initial and transition states in a Finite State Machine
  • Explain how search trees are used to improve gameplay
Description

In this lesson, students will build a working Tic Tac Toe game. Students may also learn new concepts in Python depending on their previous skill level.

Objective

Students will be able to:

  • Create a working Tic Tac Toe game
  • Use 2D arrays, Lists, Iteration, and Boolean Expressions in a program
Description

In this lesson, students will develop a random non-player character (NPC) to play against a user. Students will also evaluate the quality of their NPC, and whether it’s suitable for use in gameplay.

Objective

Students will be able to:

  • Create a random NPC
  • Evaluate the quality of their NPC
Description

In this lesson, students will learn how search trees are used to improve the quality of non-player characters. Students also learn the role that recursion plays in implementing search trees, and how they can implement recursion in their own programs.

Objective

Students will be able to:

  • Define recursive functions
  • Identify the base and recursive case in a recursive function
  • Articulate the role recursion plays in search trees
Description

In this lesson, students will learn how to implement minimax, a search tree algorithm used to create realistic non-player characters, in their own Tic Tac Toe game.

Objective

Students will be able to:

  • Define minimax
  • Identify the base and recursive case in the minimax algorithm
  • Implement minimax in a working program
Description

In this lesson, students learn how to limit the depth and breadth of their minimax algorithm, making the non-player character more realistic. Students will evaluate the pros and cons of implementing these changes, and how they can be used in other searching contexts.

Objective

Students will be able to:

  • Define alpha-beta pruning
  • Implement alpha-beta pruning and depth into minimax algorithms
  • Articulate the importance of implementing alpha-beta pruning on search efficiency
Description

In this lesson, students will implement minimax from scratch without guidance. Students will take an existing game and improve it by adding the minimax function and create a game of their own.

Objective

Students will be able to:

  • Implement minimax
  • Create a working game using minimax