#pragma once
using namespace System;
using namespace System::Collections::Generic;
/** \defgroup MultiWorldTestingCsharp
\brief C# implementation, for sample usage see: https://github.com/sidsen/vowpal_wabbit/blob/v0/cs_test/ExploreOnlySample.cs
*/
/*!
* \addtogroup MultiWorldTestingCsharp
* @{
*/
//! Interface for C# version of Multiworld Testing library.
//! For sample usage see: https://github.com/sidsen/vowpal_wabbit/blob/v0/cs_test/ExploreOnlySample.cs
namespace MultiWorldTesting {
///
/// Represents a recorder that exposes a method to record exploration data based on generic contexts.
///
/// The Context type.
///
/// Exploration data is specified as a set of tuples as described below. An
/// application passes an IRecorder object to the @MwtExplorer constructor. See
/// @StringRecorder for a sample IRecorder object.
///
generic
public interface class IRecorder
{
public:
///
/// Records the exploration data associated with a given decision.
///
/// A user-defined context for the decision.
/// Chosen by an exploration algorithm given context.
/// The probability of the chosen action given context.
/// A user-defined identifer for the decision.
virtual void Record(Ctx context, UInt32 action, float probability, String^ uniqueKey) = 0;
};
///
/// Exposes a method for choosing an action given a generic context. IPolicy objects are
/// passed to (and invoked by) exploration algorithms to specify the default policy behavior.
///
/// The Context type.
generic
public interface class IPolicy
{
public:
///
/// Determines the action to take for a given context.
///
/// A user-defined context for the decision.
/// Index of the action to take (1-based)
virtual UInt32 ChooseAction(Ctx context) = 0;
};
///
/// Exposes a method for specifying a score (weight) for each action given a generic context.
///
/// The Context type.
generic
public interface class IScorer
{
public:
///
/// Determines the score of each action for a given context.
///
/// A user-defined context for the decision.
/// Vector of scores indexed by action (1-based).
virtual List^ ScoreActions(Ctx context) = 0;
};
generic
public interface class IExplorer
{
};
public interface class IStringContext
{
public:
virtual String^ ToString() = 0;
};
}
/*! @} End of Doxygen Groups*/