Skip to content

The AI experimentation for a snake game base in Unity using ML-Agents.

Notifications You must be signed in to change notification settings

maxolib/snake-ai

Repository files navigation

SnakeAI

SnakeAI is the AI experimentation for Snake game that was implemented in Unity engine.

AI List

Experimentation

Traditional AI

  • ML1Version 1

    snake-traditional-1

    Name Description
    Condition - Finding food directions (Random if more than one )
    Board size limitation unlimited
  • Version 2

    snake-traditional-2

    Name Description
    Condition - Same as Version1
    - Removing non-moveable direction for direction set
    (both food and non-food direction set)
    - Calculating game over for a next turn
    then remove it from the direction set
    Board size limitation unlimited

Machine Learning

  • ML1

    snake-traditional-1

    Name Description
    Action Up, Down, Left, Right
    State - Food position
    - Head position
    Config - Default
    Limitation -
  • ML2

    snake-traditional-1

    Name Description
    Action Up, Down, Left, Right
    State - 2x Food position
    - 2x Head position
    - 100x All of block type (Zero, Positive and Negative)
    Config - Default
    Limitation 10x10 board size only
  • ML3

    snake-traditional-1

    Name Description
    Action Up, Down, Left, Right
    State - 2x Food position
    - 2x Head position
    - 100x All of block type (Zero, Positive and Negative)
    Config - Default
    - batch_size: 128
    - buffer_size: 2048
    - hidden_units: 256
    Limitation 10x10 board size only
  • ML4

    snake-traditional-1

    Name Description
    Action Up, Down, Left, Right
    State - 2x Food position
    - 2x Head position
    - 100x All of block type (Zero, Positive and Negative)
    - 1x Number of tails
    Config - Default
    - batch_size: 128
    - buffer_size: 2048
    - hidden_units: 256
    - beta: 1.0e-4
    Limitation 10x10 board size only
  • ML5

    snake-traditional-1

    Name Description
    Action Up, Down, Left, Right
    State - 2x Food position
    - 2x Head position
    - 100x All of block type (Zero, Positive and Negative)
    - 1x Number of tails
    Config - Default
    - batch_size: 128
    - buffer_size: 2048
    - hidden_units: 256
    Limitation 10x10 board size only
  • ML6

    snake-traditional-1

    Name Description
    Action Up, Down, Left, Right
    State - 2x Food position
    - 2x Head position
    - 100x All of block type (Positive and Negative)
    - 1x Number of tails
    - 4x Food Direction Set
    - 4x Non-Food Direction Set
    Config - Default
    - batch_size: 128
    - buffer_size: 2048
    - hidden_units: 256
    Limitation 10x10 board size only

About

The AI experimentation for a snake game base in Unity using ML-Agents.

Topics

Resources

Stars

Watchers

Forks