The Coolest Chess
  • The Chess Documentation
    • Chess Game Introduction
    • Essential Prefabs
    • Components
  • Importing Stockfish AI
  • Controller
    • Base Controller
    • Two Player Controller
  • The UIs
    • Button Prefabs
    • UI Events
    • Enquiry
    • Replacing UI
    • Others
  • Scenes Details
    • ChessPGN
    • ChessPuzzleEditor
    • ChessPuzzle
    • ChessAI
  • Honorable Mentioned
    • ChessBoard class
    • GUI Classes
    • Game Logic Classes
    • The Architecture Notice
  • Customization
    • Time AI
    • AI Draw Game
    • TypeI AI
    • TypeII AI
    • Event Based Functions
    • Chess Game Finishing Rule
  • Unit Tests
Powered by GitBook
On this page
  1. Customization

TypeII AI

This page shows what can be and how to customize for TypeII AI.

PreviousTypeI AINextEvent Based Functions

Last updated 5 months ago

Adding new level for TypeII AI

Since TypeII AI uses breadth first search algorithm, it requires high computational power, potentially exponential use of computation power for increasing AI level. Personally only found out it can go as far as level 5 for a reasonable amount of computation time, depending on platforms. It might be able to go as far to beyond level 5 but at the cost of unreasonable waiting time for AI to move, for a smooth game. But iOS might be superb in its computation speed for this breadth first search algorithm, from my past experience, iOS can perform AI moves search more than 2 times faster than any other platform. For the reason of high cpu requirement, a level 5 search depth had been prepared without it being made available on any demo scenes containing AIs.

Head to the ChessAITypeIIMechanism class, five level of search depth has been there, currently the dropdown UI for TypeII AI only have 4 options available, up to level 4 search depth.

In order to enable the level 5 options, it is as easy as adding a new dropdown to the TypeII AI dropdown UI.

Level 5 of TypeII AI has up to 1650 Elo.