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

# TypeII AI

## 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.&#x20;

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.&#x20;

<figure><img src="https://2079102914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA7OKfIba5xvQF1lhv60z%2Fuploads%2FXEEPXSK9Seh1CMwpawWU%2Fdevenv_52UjPQG4z5.png?alt=media&#x26;token=aa14eee2-351c-4211-953c-cdf239acb425" alt=""><figcaption></figcaption></figure>

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

{% hint style="info" %}
Level 5 of TypeII AI has up to 1650 Elo.
{% endhint %}

<figure><img src="https://2079102914-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FA7OKfIba5xvQF1lhv60z%2Fuploads%2Fa5ZOgfYMEbx8g0b5sRJp%2FUnity_LmZRGjhooC.png?alt=media&#x26;token=884e35a4-f6cf-4670-a205-53b2b5667153" alt=""><figcaption></figcaption></figure>

