Skip to main content

Overview

The DeployableCoinFlipAgent is a simple agent that makes random binary predictions using a coin flip mechanism. This agent serves as a baseline for testing and comparison purposes.

Class: DeployableCoinFlipAgent

A basic trading agent that randomly predicts market outcomes with 50/50 probability.

Inheritance

Methods

verify_market

Verifies if the agent should process a given market. This implementation accepts all markets.
MarketType
The type of prediction market
AgentMarket
The market to verify
bool
Always returns True

answer_binary_market

Generates a random prediction for a binary market by flipping a coin.
AgentMarket
The market to predict on
ProbabilisticAnswer | None
A probabilistic answer with:
  • p_yes: 0.0 or 1.0 (randomly chosen)
  • confidence: 0.5
  • reasoning: “I flipped a coin to decide.”

Class: DeployableCoinFlipAgentByHighestLiquidity

An enhanced version of the coin flip agent that targets high-liquidity markets.

Inheritance

Configuration Properties

SortBy
default:"SortBy.HIGHEST_LIQUIDITY"
Sorts markets by liquidity, targeting the most liquid markets first
int
default:"2"
Number of markets to trade on per execution run
TradeInterval
default:"FixedInterval(timedelta(days=14))"
Minimum time interval between trades on the same market (14 days)

Usage Examples

Basic CoinFlip Agent

High Liquidity CoinFlip Agent

Custom Configuration

Implementation Details

Random Selection Mechanism

The agent uses Python’s random.choice() to make binary decisions:

Source Location

Use Cases

  1. Baseline Testing: Compare more sophisticated agents against random predictions
  2. Market Activity: Generate trading activity for testing market infrastructure
  3. Control Group: Use as a control in agent performance studies
  4. Educational: Simple example for understanding the agent architecture