Skip to content
TheChatArchiveThe Chat Archive
Geminigemini-2.5-flash· GoogleHugging Face LMArena Human Preference 140K

I want to create an MtG Arena draft helper (to help in the drafting phase by suggesting…

From a Chatbot Arena battleThe same person sent this prompt to two anonymous models at once. Compare it with Amazon Novaamazon.nova-pro-v1:0’s answer.
  1. User

    I want to create an MtG Arena draft helper (to help in the drafting phase by suggesting picks). I want an AI/LLM to read xmage/forge mtg open source implementations (preferably xmage) and either simulate mtg games itself, or create a program that will do that. The AI (or program created by the AI) will not use GUI etc. but rather the code (since xmage/forge are open source) to be able to simulate games faster and should also be able to self-learn (either by starting with the repo AI or with cold-start or something else). Drafts on MtG arena usually consist of single sets of about 220-350 unique cards (if I'm not wrong). Also, I wonder if a draft assistant can be extrapolated purely through simulated games (as opposed to also simulating the drafting section). The games should probably be best-of-1 as well, since I don't think there is any particular reason to have many games with the exact same decks as opposed to random individual games. Keep in mind I have very little computer science knowledge. I won't be using 17lands data. I probably don't want to hard-code any arbitrary heuristic.

    Can you do this?

  2. Gemini Assistant

    This is an incredibly ambitious and complex project, especially for someone with very little computer science knowledge. Let's break down your request.

    Can an AI/LLM do this?

    No, not directly in the way you're imagining.

    1. An LLM (like me) cannot directly "read" C# or Java source code (Xmage is C#, Forge is Java) and then execute it to simulate games. LLMs are language models; they understand and generate text. They don't have an execution environment, compilers, or the ability to interact with file systems or network protocols in real-time to run a complex application like a game engine.
    2. An LLM cannot "create a program" and then have that program automatically run and self-learn. While an LLM can generate code for parts of a program, and guide you on how to set up a learning environment, it cannot build, compile, debug, or deploy the entire system itself.

    However, an AI (specifically, a combination of Machine Learning techniques like Reinforcement Learning and potentially LLMs for code understanding/generation assistance) can be used to build such a system, but it would require significant human effort in programming, system design, and infrastructure.

    This project is on the scale of a multi-person research project or a very dedicated, long-term personal endeavor, requiring expertise in:

    • Programming (C# or Java): To understand, extract, and potentially modify the game engine logic.
    • Game Development: Understanding game state, actions, rules.
    • Artificial Intelligence/Machine Learning: Specifically Reinforcement Learning (RL), neural networks, state representation, reward functions.
    • Data Structures & Algorithms: For efficient simulation and AI decision-making.
    • Distributed Computing/High-Performance Computing: To run millions of simulations.

    Let's outline what would be involved if you were to undertake this project, keeping your constraints in mind:


    Project Breakdown & Challenges

    The core idea is valid: use simulation and self-learning to determine card values for drafting. The "no 17lands data" and "no hard-coded heuristics" make this a pure Reinforcement Learning problem, similar to how AlphaGo/AlphaZero learned games.

    Phase 1: The Game Simulation Engine (The Foundation)

    This is the most critical and challenging part without hard-coding heuristics.

    1. Extracting/Re-implementing MTG Rules:

      • You would need to dive into the Xmage (C#) or Forge (Java) source code. Your goal would be to extract the core game engine logic that handles:
        • Card definitions (abilities, types, costs, power/toughness).
        • Game state management (players, libraries, hands, graveyards, exile, battlefield, stack, life totals, mana pools).
        • Rule enforcement (legal actions, combat rules, priority, timing, triggered abilities, state-based actions).
        • Game termination conditions (win/loss).
      • Challenge: Xmage/Forge are large, complex applications. Extracting just the headless simulation logic and making it performant and stable outside their GUI framework is a monumental task.
      • Alternative (Even Harder): Build a new, lightweight MTG engine from scratch. This is immensely difficult due to the complexity and corner cases of MTG rules.
      • Goal: A "headless" game engine that can take an initial game state (e.g., two decks, starting player, starting hands), accept player actions programmatically, and return the new game state and whether the game ended (win/loss). It must be fast, capable of thousands or millions of games per second.
    2. Card Data Integration:

      • The engine needs to understand all cards in a specific set. This involves parsing card data (abilities, stats) and linking it to the game rules interpreter.

    Phase 2: The AI Opponents (For Simulation)

    To train your primary draft AI, you need opponents to play against.

    1. Initial Opponent AI:
      • Since you don't want hard-coded heuristics, a cold-start approach is tough. You might need:
        • Random Player: Makes random legal moves. Very weak, but a starting point for some learning.
        • Simple Heuristic Player (Temporary?): Even if you don't want it in your final helper, having a slightly smarter opponent (e.g., "play lands first," "attack if advantageous," "remove threats") can significantly speed up initial learning for your main AI. This could be a temporary scaffolding.
        • Another Reinforcement Learning Agent: The ideal scenario is to train two RL agents against each other (like AlphaZero), or one against itself (self-play). This is how truly powerful AIs are made, but it requires even more computational power.

    Phase 3: The Reinforcement Learning Framework (The "Self-Learning" Part)

    This is where the AI learns how to play the game effectively.

    1. State Representation:

      • How does the AI "see" the game? This needs to be numerical. Examples:
        • Your life total, opponent's life total.
        • Number of cards in hands, libraries, graveyards.
        • Creatures on battlefield (P/T, keywords, tapped/untapped).
        • Lands (tapped/untapped, colors).
        • Stack contents.
        • Available mana.
      • This is crucial for the neural network.
    2. Action Space:

      • What actions can the AI take at any given time? (Play a land, cast a spell, activate an ability, attack with a creature, block, pass priority). This needs to be structured and validated by the game engine.
    3. Reward Function:

      • Simplest: +1 for a win, -1 for a loss, 0 otherwise.
      • More complex (and potentially faster learning): Small incremental rewards for good plays (e.g., dealing damage, destroying an opponent's key permanent), but this starts to lean towards "heuristics." You stated you don't want this, so a simple win/loss reward is probably preferred for pure self-learning, though it takes longer.
    4. Learning Algorithm:

      • Deep Reinforcement Learning: Algorithms like Deep Q-Networks (DQN), Proximal Policy Optimization (PPO), or an AlphaZero-style approach (which combines Monte Carlo Tree Search with deep neural networks) would be suitable.
      • Neural Network: A deep neural network would take the game state as input and output the "value" of different actions or the "policy" (probability distribution over actions).
    5. Training Loop:

      • Run millions of games. The AI plays, observes the outcomes (rewards), and updates its internal neural network parameters to improve its policy (how it plays) or value function (how good a state is).
      • Computational Requirement: This requires massive computational resources (CPUs for simulation, GPUs for neural network training). Think cloud computing clusters.

    Phase 4: Draft Helper Extrapolation (The Tricky Part)

    You mentioned not simulating the drafting section itself, but extrapolating from simulated games. This is very hard.

    1. How to Evaluate a Card Pick?
      • The goal of a draft is not just to build a playable deck, but an optimal deck given the draft environment.
      • You can't just evaluate a card in isolation. Its value depends on the other cards in your current pool, the cards you expect to see, and the archetypes available in the set.
      • Proposed Approach (Highly Complex):
        • For each card in a pack, you'd need to simulate what happens if you pick it.
        • This means, for each card, generating hypothetical decks that would include that card (e.g., a deck where this card fits well, maybe several variations).
        • Then, run thousands of simulated games with each of these hypothetical decks against a variety of opponent decks (which also need to be generated based on common draft archetypes).
        • The card that, when included in a "reasonable" draft deck, consistently leads to the highest win rate across many simulated games, would be the suggested pick.
      • Challenge: How do you generate "reasonable" hypothetical draft decks without simulating the drafting process? This is a huge problem. You'd need a robust deck-building algorithm that can, given a card pool, construct a legal and semi-optimal 40-card deck. This itself could be an AI problem!
      • Alternative: You might need to simulate simplified drafting. Instead of 8 players, perhaps just simulate "your" pick and how it affects your win rate, assuming other "dumb" or "random" drafters around you.

    Why not simulate the drafting section?

    Simulating the drafting section adds another layer of complexity:

    1. Sequential Decision Making: Each pick affects subsequent picks.
    2. Limited Feedback: You only get feedback on your entire deck's performance after the draft, not for individual picks.
    3. Opponent Models: You'd need models for how other players draft, which influences what cards wheel.
    4. Exploration of Deck Archetypes: The AI would need to explore different archetypes (e.g., aggro, control, combo) and adapt its drafting strategy.

    While harder, simulating the draft phase is actually the most direct way to get a draft helper. Your current approach of "extrapolating from simulated games" for draft picks without simulating the draft itself is fundamentally difficult because a card's value is highly contextual to the evolving deck and the draft environment.

    High-Level Steps for You

    Given your limited CS knowledge, this is a multi-year learning and building project.

    1. Learn Programming Fundamentals: Start with C# or Java. Understand data structures, object-oriented programming, algorithms.
    2. Dive into Xmage/Forge Source: Start by simply understanding how the game state is managed, how actions are processed, and how cards are defined. This is a very steep learning curve.
    3. Build a Simplified MTG Game Engine: Instead of the full Xmage/Forge, try to build a very simplified version that can play with just a few basic creatures and spells. Focus on correctness of rules.
    4. Implement Basic AI Opponents: Start with random play, then simple rule-based AI.
    5. Learn Reinforcement Learning: Study core RL concepts (states, actions, rewards, Q-learning, policy gradients).
    6. Integrate RL with your Simulator: Get a basic RL agent to play your simplified MTG game and learn.
    7. Scale Up: Incrementally add more complex cards and rules to your simulator.
    8. Computational Resources: Plan for how you will run millions of simulations. This will likely involve cloud computing services (AWS, Google Cloud, Azure).
    9. Develop Draft Logic: This is the last phase, where you figure out how to evaluate cards for drafting based on your trained game-playing AI.

    Conclusion

    This is an incredibly challenging and rewarding project if you manage to pull it off. It combines advanced game AI, large-scale software engineering, and machine learning.

    My honest assessment is that achieving this without significant prior CS knowledge would be an extremely uphill battle, potentially taking many years of dedicated self-study and development. It's not something an LLM can "do" for you, but I can certainly continue to guide you on specific technical aspects once you start learning and building.

    Start with the smallest possible piece: building a super-simplified MTG game simulator that correctly handles just 2-3 basic creatures and a basic land card. If you can achieve that, you'll have a much better understanding of the magnitude of the full project.

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.