Site icon Game Development News

AI Training for Cat Connect

Introduction

Game Overview

Cat Connect is a line-connect puzzle game, a popular genre where players create paths to connect matching items without crossing existing paths. In this game, players connect matching colored cats across a predefined grid. Each level consists of a grid containing various colored cats that need to be paired. The objective is to form valid connections between like colours while avoiding boxes that are already part of a path or occupied by other colored cats.

Cat Connect gameplay screenshot

Grid Structure

A grid is a two-dimensional matrix of cells. For example, a 3×3 grid contains nine total cells. Depending on the level design, the system may populate it with 1–3 colored cats. Each coloured cat occupies two cells, and the arrangement determines the complexity of possible paths.

Game Mechanics

The objective of the game is to connect matching cats on a grid by drawing paths between them. Players must create continuous, non-overlapping routes that fill the grid logically without crossing or interfering with other paths. Each move is made by selecting a starting point and extending the path across adjacent cells. Movement is restricted to four directions i.e. up, down, left, and right, ensuring that navigation remains simple, intuitive, and consistent. Successful completion requires the player to use spatial reasoning, plan ahead, and ensure every pair is connected without blocking future moves.

Win/Loss Conditions

  1. Win: The AI agent successfully connects all required colors and fills all the boxes.
  2. Loss: The agent becomes stuck and fails to progress. If it reaches a stuck penalty threshold of 10 consecutive failed attempts, the level is marked unsolvable, and the agent moves to the next level.

Note: All experiments were conducted on a system equipped with 32 GB DDR4 RAM, an NVIDIA GTX 1050 Ti (4 GB) GPU, and an Intel Core i5-10400 CPU.

AI TRAINING

Role of the Agent

The AI agent functions as both a solver and an evaluator, designed to intelligently interact with the game grid and support the level-design process. Its primary role is to simulate real player behavior, analyze grid structure, and ensure each level meets expected quality and difficulty standards.

To do this, the agent must understand and operate within the spatial rules of the game. It identifies ‘go’ and ‘no-go’ areas to determine where movement is allowed and where it is restricted. Go areas include all empty, navigable cells the agent can move through when forming connections. No-go areas include any cells already occupied by an existing path or by another color, making them blocked and unusable. Since the agent can only move in four directions i.e. up, down, left, and right, this mapping is essential for avoiding conflicts and ensuring a clean, valid path.

It does so by:

Problem Solved by the Agent

The AI agent is designed to tackle two fundamental challenges in level design and evaluation:

By addressing both of these challenges, the agent provides designers with objective, data-driven feedback, reducing manual testing effort and improving overall level quality.

Solving the grid

The agent solves the grid by trying to match one color to its counterpart. To do this, it first picks a cat randomly then identifies go areas, which are empty cells, and no-go areas, which include cells with other colors or any unavailable paths. If the agent gets stuck on a particular color for a certain amount of time, it automatically switches to the next color (randomly) and continues trying to solve the level. If the agent remains stuck on the level for an extended period, it incurs a stuck penalty and the level is restarted from the beginning. When the agent accumulates 10 consecutive stuck penalties on a level, the level is deemed unsolvable, and the agent moves on to the next level. Throughout this process, the agent tracks success metrics such as win/loss ratios, and number of attempts which inform difficulty assessment and level tagging.

Level evaluation and tagging

Playability Validation

The agent repeatedly plays each level and evaluates its solvability. 

Difficulty Assignment

The agent evaluates each level by analyzing success ratios and the number of attempts, then assigns a corresponding difficulty tag:

This ensures levels are classified objectively, helping guide player progression and design decisions.

Comparison of different difficulty levels.

Future goals: dynamic level generation

With increased computational resources, such as more powerful GPUs, our vision is to:

conclusion

The Cat Connect AI framework provides a structured, data-driven approach to evaluating and managing puzzle levels. By using the agent, we reduce reliance on manual testing, ensure levels are consistently playable, and assign difficulty objectively. This not only saves time for designers and developers but also improves the player experience by delivering well-balanced and engaging challenges. With additional computational resources, the system can evolve to generate levels dynamically, offering endless, personalized puzzles that adapt to each player’s skill level.


Exit mobile version