new MinimaxTreeAdapter()
- Description:
Minimax Tree Adapter - Visualisierung des Minimax Algorithmus
Extends BaseTreeAdapter mit Minimax-spezifischen Features:
- Value-basierte Node-Färbung (Min/Max-Nodes)
- Best-Move Tracking und Visualisierung
- Performance-Statistiken (visited nodes, iterations)
- Source:
- Version:
- 2.3
Methods
_buildResult(rootId) → {Object}
- Description:
Erzeugt ein Standard-Resultat für die UI.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
rootId |
number |
Returns:
- Type
- Object
_createChildMetadata()
- Description:
Helper to create child metadata. Can be overridden.
- Source:
_createChildStructure()
- Description:
Helper to create additional tree structure data. Can be overridden.
- Source:
_evaluateTerminalState(state) → {Object}
- Description:
Bewertet einen terminalen Knoten relativ zum Root-Spieler.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
state |
GameState |
Returns:
- Type
- Object
_getEdgeColorForValue(value) → {string}
- Description:
Liefert Kantenfarbe entsprechend Gewinnerfarbe (statt Vorzeichenfarbe).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
number |
Returns:
- Type
- string
(protected) _getHighlightEdgeStyle(bestValue) → {Object}
- Description:
Liefert Farbe und Breite für Best-Edge-Highlighting (wertabhängig).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
bestValue |
number |
Returns:
- Type
- Object
_getValueStatuses(value) → {Array.<string>}
- Description:
Liefert zusätzliche Visualisierungs-Status anhand des Werts.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
number |
Returns:
- Type
- Array.<string>
(protected) _isLeafTerminal(nodeId, data) → {boolean}
- Description:
Prüft ob ein Blattknoten terminal ist (spielbasiert). Überschreibt BaseTreeAdapter._isLeafTerminal für Game-State-Prüfung.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
nodeId |
number | |
data |
Object |
Returns:
- Type
- boolean
_isTerminalState(state) → {boolean}
- Description:
Prüft, ob ein Zustand terminal ist.
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
state |
GameState |
Returns:
- Type
- boolean
_orderMoves(validMoves, state, currentData) → {Array}
- Description:
Optionales Move-Ordering für Visualisierung. Kann in Subklassen überschrieben werden (z. B. Alpha-Beta).
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
validMoves |
Array | |
state |
GameState | |
currentData |
Object |
Returns:
- Type
- Array
_resolveConstants() → {Object}
- Description:
Lädt zentrale Konstanten mit robusten Fallbacks.
- Source:
Returns:
- Type
- Object
evaluateNode()
- Description:
Führt die Bewertung eines Knotens durch.
- Source:
(async) visualizeSearch()
- Description:
Startet die Visualisierung (Aufbauphase).
- Source: