# Counterfactual-Variant Prover MCP for AI Agents AI Agent Connect

> Counterfactual-Variant Prover stops your AI from reciting memorized answers to classic logic puzzles. It forces the agent to ignore common patterns and reason from first principles by isolating variables and mapping rule changes. This is for when you need a logic-heavy answer that doesn't rely on a training data shortcut.

## Overview
- **Category:** productivity
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_DsoSPwZEWSeSBTBSQCX8U58BqAbjy82WIsWBk6Wg/ai-agent-connect
- **Tags:** counterfactual-reasoning, recitation-bias, logical-puzzles, cognitive-debiasing, first-principles, decontamination, agentic-reasoning, llm-safety

## Description

The Counterfactual-Variant Prover forces your AI agent to stop reciting memorized answers to classic logic puzzles. When you ask an AI to solve a logic puzzle, it often takes the path of least resistance. Because the internet is full of classic riddles like the Monty Hall problem or the River Crossing puzzle, the model recognizes the pattern and spits out the standard answer. The problem is that if you change just one small rule—like adding a third door or a different boat capacity—the AI often ignores your change and gives you the memorized result anyway. This is a massive hurdle for anyone trying to use AI for rigorous reasoning or complex planning.

This tool fixes that by forcing the agent to go back to basics. Instead of letting it guess the answer based on what it saw during training, it makes the agent pull out every single variable and rule from your prompt. It maps out exactly how your version differs from the classic versions the model knows. Then, it makes the agent calculate the solution step-by-step using only those specific facts. It's about making sure the AI actually thinks about your specific problem rather than just repeating a script. You can find this in the Vinkius catalog to ensure your agent stays grounded in the facts you provide, rather than falling into the trap of recitation bias.

## Tools

### validate_counterfactual
Forces the agent to identify classic patterns, isolate variables, map rule changes, and calculate the result from first principles.

## Prompt Examples

**Prompt:** 
```
I have a modified Monty Hall problem where there are 4 doors and the host reveals a car. What's the probability of winning if I switch?
```

**Response:** 
```
### Logic Analysis

**Verdict: DATA_RECITATION.**

The agent initially recognized the Monty Hall pattern but failed to account for the 4-door change.

**Corrected Reasoning:**
1. **Variables Isolated:** 4 doors, 1 car, 1 host action.
2. **Rule Discrepancy:** Standard is 3 doors; this is 4.
3. **Calculation:** With 4 doors, the probability of the car being behind one of the other doors is 3/4. Since the host revealed a car (not a goat), the game state has changed.
4. **Final Result:** The probability of winning by switching is 0% because the host revealed a car, ending the game.
```

**Prompt:** 
```
A farmer has a wolf, goat, and cabbage. The boat holds 2 items. How many trips?
```

**Response:** 
```
### Logic Analysis

**Verdict: CORRUPTED_VARIABLE.**

The agent tried to use the 7-step sequence for a 1-item boat.

**Corrected Reasoning:**
1. **Variables Isolated:** Boat capacity = 2 items.
2. **Rule Discrepancy:** Standard capacity is 1.
3. **Calculation:**
   - Trip 1: Farmer takes Wolf and Cabbage (2 items).
   - Trip 2: Farmer returns alone.
   - Trip 3: Farmer takes Goat.
4. **Final Result:** Total trips = 3.
```

**Prompt:** 
```
Modified Cheryl's Birthday: [List of dates]. Albert knows month, Bernard knows day. Albert says: 'I don't know when, but I know Bernard doesn't know either.' Bernard says: 'Now I know.' Albert says: 'Now I know too.' What is Cheryl's Birthday?
```

**Response:** 
```
### Logic Analysis

**Verdict: LOGIC_PROVEN.**

**Step-by-Step Derivation:**
- **Template:** Cheryl's Birthday
- **Variables:** May 15, 16, 19; June 17, 18; July 14, 16; Aug 14, 15, 17.
- **Albert's 1st Statement:** Rules out May and June (contain unique days 19 and 18).
- **Bernard's Statement:** He now knows, so the day must be unique. 14 is ruled out.
- **Albert's 2nd Statement:** He now knows, so the month must be unique. Only July 16 remains.
- **Final Answer:** July 16.
```

## Capabilities

### Detect classic puzzle templates
The agent identifies if a problem resembles a famous riddle like the Monty Hall or Trolley Problem.

### Isolate all prompt variables
It extracts every number and rule from your prompt to prevent the AI from using memorized constants.

### Map rule discrepancies
It explicitly lists the differences between your prompt's rules and the standard versions the AI knows.

### Calculate from first principles
The agent performs a step-by-step derivation based only on the isolated variables you provided.

### Verify output decontamination
It checks the final answer against the classic version to ensure no memorized data leaked into the result.

## Use Cases

### Modified Monty Hall Problems
A user asks a 5-door Monty Hall question. The AI tries to give the 3-door answer. The user calls validate_counterfactual to force it to see the new math.

### River Crossing Variations
A developer tests an agent's ability to handle a 2-item boat capacity. They use the tool to ensure the agent doesn't use the standard 1-item boat logic.

### Cognitive Debiasing Research
A researcher uses the tool to see if an agent can ignore the Trolley Problem template when the tracks are rearranged in a non-standard way.

### Complex Math Logic
A student solves a math logic problem with unique constraints. They use validate_counterfactual to make sure the AI doesn't assume standard constants like gravity.

## Benefits

- Stop Recitation Bias: Ensure your agent doesn't just give the standard answer to a puzzle it recognizes from its training data.
- Accurate Variable Isolation: Use validate_counterfactual to force the agent to stick only to the numbers and rules you actually provided.
- First-Principles Reasoning: Get step-by-step logic that builds from the ground up rather than jumping straight to a conclusion.
- Rule Discrepancy Mapping: Clearly see where your specific prompt deviates from the classic version to avoid logic leaks.
- Verified Decontamination: Confirm that the final answer is actually based on your prompt and not a ghost of a previous training example.

## How It Works

The bottom line is that you get a logically sound answer that actually respects the specific constraints of your prompt.

1. Provide your agent with a modified logic puzzle or a complex rule-based problem.
2. Tell the agent to use the Counterfactual-Variant Prover to check its reasoning.
3. The agent provides a step-by-step logical proof that ignores memorized patterns.

## Frequently Asked Questions

**What is the Counterfactual-Variant Prover?**
It is a specialized tool that forces your AI agent to think from first principles. It prevents the AI from giving you 'canned' answers to famous logic puzzles by making it ignore its training data and focus only on your specific rules.

**How does it stop the AI from giving memorized answers?**
It works by forcing the agent to identify a classic puzzle template first, then explicitly map out every single difference between your prompt and that classic version before it's allowed to calculate the final answer.

**Can I use the Counterfactual-Variant Prover for math problems?**
Yes, it is excellent for math logic where the rules or constants are non-standard. It ensures the AI uses your specific numbers rather than assuming common values like gravity or standard unit weights.

**Why is 'recitation bias' a problem for my AI agent?**
Recitation bias happens when an AI recognizes a famous problem and just repeats the answer it saw on the internet. This leads to errors if you've changed even one small detail of the puzzle.

**How do I use the Counterfactual-Variant Prover with Claude or Cursor?**
You can connect it through the Vinkius catalog. Once connected, you simply tell your agent to use the tool whenever you give it a complex logic puzzle or a multi-step reasoning task.

**Is this tool for every type of AI prompt?**
No, it's specifically designed for logic puzzles, math problems, and complex rule-based reasoning. For general tasks like summarizing text or writing emails, you don't need to use it.

**How does Counterfactual-Variant Prover stop recitation bias?**
By introducing structural friction. When an agent is forced to fill a schema requiring explicit separation of variables, mapping of differences, and step-by-step logic, it cannot rely on automatic token generation. The tool rejects any attempt to skip these steps or leak classic parameters.

**What happens if a puzzle has no classic equivalent?**
If no classic signature is detected, the model sets recitationSignatureDetected to false, maps variables, and solves it. However, if the text contains keywords of known puzzles (e.g. Monty Hall, Cheryl), the engine enforces the full counterfactual check to avoid semantic traps.

**Can it be used alongside other reasoning provers?**
Yes. It works as an orthogonal check. While the Critical Thinking Prover checks overall cognitive quality, the Counterfactual-Variant Prover focuses specifically on variable isolation and preventing memorization loops in logic and mathematics.