Newer
Older
Hierarchical-Task-Network-Unity-3D / README.md

Supermarket Prototype – HTN AI System

A solo-developed Unity 3D prototype experimenting with Hierarchical Task Networks (HTN) for character behavior in a small supermarket simulation. The player controls the shop owner, who can perform tasks manually or allow the AI to handle them. Customers (NPCs) follow simple shopping routines, buying products based on a predefined list.

⚠️ This project is a work in progress. Core systems are partially implemented. See below for more details.

Preview


🧠 About the Project

This prototype explores a hybrid AI control system using HTN (Hierarchical Task Networks). It allows switching between direct player control and autonomous AI behavior, where the shop owner performs tasks such as restocking shelves or moving around the store. If left idle, the player character will begin executing tasks automatically.

NPC customers have early-stage behavior logic: they visit the shop, look for products on a list, and make purchases, adding money to the store's balance. The system is designed to simulate basic retail activity, laying the foundation for more advanced features in the future.


πŸ›  Tools & Technologies

Built entirely in Unity 3D, the project makes use of:

  • Unity UI Toolkit – for the in-game user interface
  • ProBuilder – to quickly create and edit geometry in the scene
  • ProGrids – to maintain modular and aligned level design
  • C# – for all gameplay and AI scripting
  • Unity’s Input System – for handling player inputs
  • Shader Grapgs/Shaders - for world object highlights

🚧 Current State

  • NPC customers can enter the shop and purchase products (currently limited to two types of soda)
  • The shop owner is currently static, stationed at the cash register
  • Customers form a queue if the shop owner is not present at the register
  • Early UI implementation showing shelf product capacity
  • No final visuals or complete UI β€” functional gray-box prototype
  • No audio or VFX implemented yet

πŸ“Œ Planned Features

These are not yet implemented but are part of the roadmap:

  • More complex HTN layers for both shop owner and customers
  • Autonomous task scheduling when player is idle
  • Shader-based visual polish for interior elements
  • Inventory and financial systems

πŸ‘€ Solo Developer

This project is being designed and developed entirely by me β€” from code and design to visuals and systems integration.


πŸ’» Development Environment

Please note: This project is not optimized. It's still under active development and intended for prototyping purposes.

Tested and developed on the following system:

  • CPU: Intel Core i7-7800X
  • GPU: ASUS GTX 1070 OC
  • RAM: 32 GB
  • Motherboard: ASUS Prime X299-A

Performance and behavior may vary on other setups.


🧰 Development Setup

  • Unity Version: 6.1 (6000.1.1f1)
  • Render Pipeline: High Definition Render Pipeline (HDRP)
  • Graphics API: DirectX 12

⚠️ No build is currently provided, as the project is still in early development and not ready for testing.

πŸ”— More Info

This README offers a high-level overview.
For source code, implementation details, and updates, check the Git repository and commit history.