Skip to content

lemoinep/BusinessStrategySimulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Business Strategy Simulator – Sun Tzu Tactics for Modern Competition

Version License Python


Business Strategy Simulator is an interactive application that models and analyzes the strategic and financial competition between two companies. Inspired by the principles of Sun Tzu’s “The Art of War,” the simulator helps users experiment with offensive and defensive business tactics, resource allocation, AI-driven competitor behaviors, and market adaptations in a realistic, turn-based environment.

Key Features

  • Company Asset Modeling: Each company consists of various business units (Sales, Marketing, R&D, Legal, Finance, Analytics, Market Intelligence), each with budgets and distinct competitive strengths.
  • Adaptive AI Competitor: The program includes an advanced competitor AI that analyzes outcomes and adapts its personality and investment strategy (aggressive, defensive, or deceptive) based on recent performance.
  • Dynamic Environment: The simulation considers shifting market types (stable, volatile, regulated, etc.), economic conditions (growth, inflation, recession), and business cycles (quarters).
  • Strategic Actions and Events: Users encounter realistic business scenarios such as surprise product launches, supply chain disruption, market campaigns, regulatory impacts, and more.
  • Resource Management: Allocate cash, investment points, and brand strength strategically across business units to maximize performance and respond to environmental changes.
  • Turn-Based Simulation: Play through multiple quarters, with each turn representing a period (e.g., one fiscal quarter) in which companies act, invest, compete, and adapt.
  • Data Visualization: Track and analyze key indicators (market share, stress, liquidity, sentiment, strategic actions) with interactive charts.
  • Result Reporting: Automatically generates comprehensive Excel reports summarizing the campaign, assets, actions, and outcomes for both companies.
  • Save/Load Functionality: Save campaign progress to resume or analyze scenarios later.

How It Works ?

Each simulation round represents a business quarter. You, as the primary company, allocate resources to business units, choose investment strategies, and influence market outcomes. The AI competitor continually adapts its strategy, observing your moves and responding aggressively, defensively, or with deception. The simulation resolves market competition, strategic attacks (like marketing campaigns or sabotage), and defensive measures, all while factoring in environmental changes and company morale.

Throughout each turn, key metrics (such as market share, sentiment, stress, liquidity) are updated and visualized. Ultimately, the program determines the winner by comparing the final market share held by each company.

Use Cases

  • Educational tool: Explore practical applications of competitive strategy, resource management, and adaptive AI in business.
  • Scenario analysis: Test “what-if” outcomes for business decisions, market disruptions, and competitive tactics.
  • Strategic planning: Simulate campaigns for startups, established companies, or hypothetical sectors.

Sun Tzu Stock Tactics Simulator

This program is an interactive stock portfolio simulator inspired by the ancient strategies of Sun Tzu’s “The Art of War” and adapted to modern financial markets. It allows users to manage a portfolio consisting of major stocks and ETFs, while an AI adversary—representing the market—responds with evolving tactics modeled after classic Sun Tzu principles such as strategic deception, adaptation, and exploiting weakness.

Throughout each simulation turn, the user determines portfolio allocations, responds to changing market conditions (including fear, volatility, and liquidity), and encounters dynamic events orchestrated by the AI. The AI opponent shifts between bullish, bearish, and sideways “personalities,” challenging the user’s positions using game theory and Sun Tzu-inspired logic. The system not only provides tactical advice—such as when to be aggressive or defensive—but also simulates the emotional element (“morale”) and psychological maneuvers that characterize both historical battles and real-world investing.

Key Features

  • Simulates stock portfolio management inspired by Sun Tzu’s strategic principles from "The Art of War."
  • Adaptive AI market opponent with changing personalities: bullish, bearish, or sideways.
  • Dynamic market conditions based on fear index, liquidity, and volatility to challenge player decisions.
  • Tactical guidance reflecting Sun Tzu ideas such as striking fear, conserving resources, and exploiting market weaknesses.
  • Interactive GUI for selecting portfolio allocations and running multi-turn simulations.
  • Detailed logs of trades, tactical decisions, and market responses for deep insights.
  • Exportable reports tracking portfolio value, market sentiment, and AI strategy evolution.

How It Works

The user allocates percentages of their capital among a selection of major stocks and ETFs. Each simulation turn mimics real market conditions by dynamically adjusting factors like volatility, liquidity, and market fear. The market is represented by an AI adversary that changes tactics inspired by Sun Tzu's warfare strategies, influencing market events such as rallies or sharp drops.

The program rebalances the portfolio automatically each turn according to the user’s allocation, while the AI tries to “outwit” the player by simulating adverse or favorable market moves. Users receive real-time feedback through logs and can observe how their portfolio performs compared to a baseline market index, representing the “battlefield” outcomes.

Use Cases

  • As a learning tool for investors seeking to deepen understanding of market dynamics via strategic thinking.
  • For practicing portfolio diversification and risk management under simulated volatile conditions.
  • To explore how classical military strategies can translate into modern financial decision making.
  • As a serious game combining investing and tactical challenge for enthusiasts of both domains.
  • To test different tactical allocations and analyze the robustness of investment strategies against adaptive adversarial market behaviors.

This tool serves as both a learning platform for portfolio risk management and a serious game where investment decisions are pitted against a cunning, adaptive market adversary, helping users refine their skills in strategy, resource allocation, and psychological resilience under realistic trading scenarios.


Sun Tzu The Art of Investment War in real time + Chess AI logic

The strategies implemented in the program combine concepts from Sun Tzu’s The Art of War and chess strategy to guide investment decisions in modern stock markets.

Strategic Topics and Clarifications

Preparation and Planning

  • The program analyzes both the market and portfolio before acting, treating every investment decision like preparation before a battle or chess match.
  • It emphasizes gathering intelligence (market data, asset performance), mirroring Sun Tzu’s advice to “know yourself and your enemy”.

Adaptive Allocation and Risk Management

  • The AI continually adjusts its behavior and portfolio allocations in response to changing market conditions, just as both Sun Tzu and chess principles recommend adaptability and readiness to pivot strategies.
  • Risk management is central: it avoids unnecessary battles (risky trades), preserves liquidity, and recommends defensive moves when market tension is high, protecting capital for long-term success.

Positioning and Control

  • Assets are evaluated for their “central control” of the market, much like chess pieces dominating the center of the board.
  • The program seeks strong positions in key sectors, maximizes advantage where possible, and adjusts if the market signals weakness.

Timing and Patience

  • AI patiently waits for high-probability opportunities and only takes aggressive actions when the timing is right, in line with Sun Tzu’s teachings on patience and exploiting the perfect moment.

Tactical Adaptation

  • Recommendations include attacking (buying more when the market presents opportunities), defending (selling or holding during high volatility), or simplifying (exiting weak positions in low-tension phases).
  • The strategy engine tracks phases (opening, mid-game, endgame, stability), adapting its approach and tactics as the simulation unfolds.

Discipline and Exploitation

  • The AI enforces discipline, sticking to strategic plans and avoiding impulsive or emotional decisions.
  • It exploits market weaknesses—identifying undervalued opportunities and protecting against overexposure or false signals.

Diversification and Flexibility

  • The portfolio is diversified to balance risk, and the AI remains flexible, adapting allocation and tactics to evolving market environments.

Summary Table

Strategy Component Sun Tzu Principle Chess Concept Program Implementation
Preparation Know yourself/enemy Calculation of opening Asset and market analysis
Adaptive Planning Flexibility/adapt to terrain Change plans in mid-game Personality & phase changes
Central Control Take strong positions Control center Sector dominance evaluation
Risk Management Avoid unnecessary battles Defend key squares Liquidity, tension, protective moves
Timing Strike at right moment Wait for best moves Act on high-probability setups
Diversification Well-balanced force Piece activity/coverage Portfolio diversification
Discipline Self-control and restraint Avoid blunders Restricts impulsive trades
Exploitation Attack weakness, protect own Exploit weak squares, defend Seek undervalued assets, manage risk

This holistic approach encourages disciplined, flexible, and intelligent market participation, blending ancient strategic wisdom with proven decision-making frameworks to optimize investment results.

For more information


📝 Author

Dr. Patrick Lemoine
Engineer Expert in Scientific Computing
LinkedIn


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages