> ## Documentation Index
> Fetch the complete documentation index at: https://docs.askui.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tic Tac Toe Agent

> Building a game-playing AI agent with complex decision logic

This example demonstrates how to create an intelligent agent that can play Tic Tac Toe against a computer opponent, showcasing complex decision-making and canvas-based interactions.

## Video Demonstration

<iframe width="100%" height="400" src="https://www.loom.com/embed/621e2dd6fb4d44d2b1181f1b11e013c9?sid=64422ffa-20f3-4325-a02c-ec2a613788ba" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen />

## What This Example Shows

### Complex Act Commands

* Using natural language to describe game strategies
* Multi-step planning and execution
* Adaptive decision-making based on game state

### Game Logic Implementation

* Understanding game rules and win conditions
* Strategic move selection
* Defensive and offensive play strategies

### Canvas Environment Handling

* Interacting with HTML5 canvas elements
* Clicking on specific grid positions
* Visual recognition of game pieces

## Key Techniques Demonstrated

1. **Canvas Interactions**: Precise clicking on canvas grid cells
2. **Game Logic Implementation**: Understanding game rules and win conditions
