GameTheoryTask

Analyze strategic interactions using game theory. Identifies Nash equilibria, dominant strategies, and Pareto optimal outcomes to provide actionable strategic recommendations.

Category: Reasoning Side-Effect: Safe Model: GPT-4 Preferred
⚙️ GameTheoryConfig.json
{
  "game_scenario": "Two tech firms deciding on R&D budgets",
  "players": ["AlphaCorp", "BetaSystems"],
  "game_type": "non-cooperative",
  "find_nash_equilibria": true,
  "provide_recommendations": true
}
👁️ Session UI Output
Overview
Game Structure
Nash Equilibria
Summary

Nash Equilibria Analysis

Identified 1 Pure Strategy Equilibrium:

(High R&D, High R&D)

Neither firm can improve their payoff by unilaterally decreasing budget, as the competitor would capture market share.

Live Results Showcase

Explore actual analysis artifacts generated by the GameTheoryTask in the test workspace.

Configuration Parameters

Field Type Description
game_scenario* String The strategic situation or game to analyze.
players* List<String> List of players/agents involved in the interaction.
game_type String cooperative, non-cooperative (default), zero-sum, repeated, sequential.
player_strategies Map Optional map of player names to lists of available strategies.
build_payoff_matrix Boolean Whether to construct a detailed payoff matrix. Default: true.
find_nash_equilibria Boolean Whether to identify Nash equilibria. Default: true.
analyze_dominant_strategies Boolean Analyze strictly/weakly dominant and dominated strategies. Default: true.
find_pareto_optimal Boolean Identify outcomes where no player can be better off without hurting another. Default: true.
repeated_game_analysis Boolean Analyze dynamics over multiple iterations. Default: false.
iterations Int Number of rounds for repeated analysis. Default: 10.
input_files List<String> Glob patterns for files to use as context (e.g. **/*.kt).
additional_context String Manual text input for constraints or background info.

Token Usage: Medium to High (depends on scenario complexity and iterations).

Task Process Lifecycle

  1. Structure Analysis: Identifies game type, strategy spaces, and information symmetry from the scenario and context files.
  2. Payoff Construction: Builds a matrix mapping strategy combinations to qualitative or numerical outcomes for each player.
  3. Equilibrium Discovery: Identifies Nash equilibria (pure/mixed) and checks for Pareto optimality.
  4. Dominance Analysis: Evaluates strictly and weakly dominant strategies to simplify the decision space.
  5. Strategic Synthesis: Generates specific recommendations, risk assessments, and coordination opportunities for each player.
  6. Structured Summary: Uses a ParsedAgent to extract a machine-readable GameAnalysis object.

Embedded Execution (Headless)

Invoke the GameTheoryTask directly using the UnifiedHarness for automated strategic analysis in CI/CD or CLI tools.

Kotlin Integration Example
import com.simiacryptus.cognotik.plan.tools.social.GameTheoryTask
import com.simiacryptus.cognotik.plan.tools.social.GameTheoryTask.Companion.GameTheory

fun analyzeStrategy(harness: UnifiedHarness, projectDir: File) {
    val config = GameTheoryTask.GameTheoryTaskExecutionConfigData(
        game_scenario = "Pricing war between Cloud providers",
        players = listOf("ProviderA", "ProviderB"),
        game_type = "repeated",
        repeated_game_analysis = true,
        iterations = 5,
        input_files = listOf("market_data/*.csv")
    )

    harness.runTask(
        taskType = GameTheory,
        executionConfig = config,
        workspace = projectDir,
        autoFix = true
    )
}

CLI Usage

# Run via Cognotik CLI
java -jar cognotik-cli.jar \
  --task GameTheory \
  --config '{
    "game_scenario": "Open source vs Proprietary licensing",
    "players": ["Community", "EnterpriseCorp"],
    "game_type": "non-cooperative",
    "find_nash_equilibria": true
  }' \
  --workspace ./my-project

Prompt Segment

GameTheory - Analyze strategic interactions using game theory
  ** Specify the strategic situation or game scenario
  ** Define players and their available strategies
  ** Choose game type: cooperative, non-cooperative, zero-sum, repeated, sequential
  ** Identify Nash equilibria and dominant strategies
  ** Find Pareto optimal outcomes