Table of Contents

Class HierarchNGram<T>

Namespace
LibGameAI.NGrams
Assembly
NGrams.dll

Hierarchical N-Gram.

public class HierarchNGram<T> : INGram<T>

Type Parameters

T

The type of the actions.

Inheritance
HierarchNGram<T>
Implements
Inherited Members

Constructors

HierarchNGram(int, int)

Creates a new hierarchical N-Gram.

public HierarchNGram(int nValue, int threshold)

Parameters

nValue int

The N in N-Gram (window size + 1).

threshold int

Minimum number of observations for a specific N-Gram to return a prediction.

Properties

NValue

The N in N-Gram (window size + 1).

public int NValue { get; }

Property Value

int

Methods

GetMostLikely(IReadOnlyList<T>)

Get the most likely action given a sequence of actions.

public T GetMostLikely(IReadOnlyList<T> actions)

Parameters

actions IReadOnlyList<T>

The actions list, which should be at least of size 1.

Returns

T

The most likely action for the given a sequence of actions.

RegisterSequence(IReadOnlyList<T>)

Register a sequence of actions.

public void RegisterSequence(IReadOnlyList<T> actions)

Parameters

actions IReadOnlyList<T>

The actions list, which should be at least of size 1.