Faze
v2.0.0-pre
v2.0.0-pre
  • Introduction
  • Getting Started
  • Abstractions
    • IPipeline
    • IGameState
    • IPlayer
    • Rendering
      • ITreePainter
      • IPaintedTreeRenderer
      • IColorInterpolator
  • Engine
    • Agents
  • Rendering
    • Tree Renderers
      • SquareTreeRenderer
      • SliceAndDiceTreeRenderer
    • Color Interpolators
  • Concept
    • Tree Rendering
    • Real-time Rendering
  • Blog
    • Visualising games as fractals
    • Visualising player choice
  • Examples
    • 8 Queens Problem
    • Chess Pieces
    • Gallery
  • Research
    • Renderers
      • Square Tree Renderer
      • Circle Edge Renderer
      • Compressed Square Tree Renderer
  • GitHub Repository
Powered by GitBook
On this page

Was this helpful?

  1. Abstractions

IPlayer

Game agent

PreviousIGameStateNextRendering

Last updated 3 years ago

Was this helpful?

An agent is responsible for evaluating and assigning a confidence against all available moves. This is achieved by returning an IMoveDistribution object.

public interface IPlayer
{
    IMoveDistribution<TMove> GetMoves<TMove, TResult>(IGameState<TMove, TResult> state);
}

See for documentation on the predefined implementations of IPlayer.

IMoveDistribution

An IMoveDistribution abstracts choosing a random move from a distribution, where the chance of picking a move is weighted by the agent's assigned confidence.

public interface IMoveDistribution<TMove>
{
    TMove GetMove(UnitInterval ui);
    
    bool IsEmpty();
}

The UnitIntervaltype represents a number between 0 and 1 inclusive.

Agents