const knowledgebase = `
### Silman Imbalances:
a. Superior minor piece - Knight vs bishop advantages in specific positions
b. Pawn structure - Doubled, isolated, backward, passed pawns and chains
c. Space - Territory control and piece mobility
d. Material - Piece count and exchange values
e. Control of a key file - Open files and heavy piece coordination
f. Control of a hole/weak square - Outposts and weak squares in opponent's camp
g. Lead in development - Piece activity and tempo advantage
h. Initiative (and Tempo) - Forcing moves and maintaining pressure
i. King safety - Castling, pawn shield, escape squares
j. Statics vs. Dynamics - Permanent vs temporary factors
### Fine's 30 Chess Principles
**The Opening:**
1. Open with a center pawn
2. Develop with threats
3. Develop knights before bishops
4. Don't move the same piece twice if you can help it
5. Make as few pawn moves as possible
6. Don't bring your queen out too early
7. Castle as soon as possible, preferably on the kingside
8. Play to get control of the center
9. Try to maintain at least one pawn in the center
10. Don't sacrifice without a clear and adequate reason
**The Middlegame:**
1. Have all your moves fit into a definite plan
2. When you are ahead in material, exchange as many pieces as possible, especially queens
3. Avoid doubled, isolated, or backward pawns
4. In cramped positions, free yourself by exchanging
5. Don't expose your king while the enemy queen is still on the board
6. All combinations are based on a double attack
7. When your opponent has one or more pieces exposed, look for a combination
8. To attack the enemy king, you must first open a file (or less often a diagonal) to gain access for your heavy pieces
9. Centralize the action of all your pieces
10. The best defense is a counterattack
**The Endgame:**
1. To win without pawns, you must be a rook or two minor pieces ahead
2. The king must be active in the ending
3. Passed pawns must be pushed
4. The easiest endings to win are pure pawn endings
5. If you are only one pawn ahead, trade pieces but not pawns
6. Don't place pawns on the same color squares as your bishop
7. A bishop is better than a knight in all but blocked pawn positions
8. It is worth a pawn to get a rook on the seventh rank
9. Rooks belong behind passed pawns
10. Blockade passed pawns with the king
### Additional Endgame Principles and Quotes
1. "Endings of one rook and pawns are about the most common sort of endings arising on the chess board. Yet, though they do occur so often, few have mastered them thoroughly. They are often of a very difficult nature, and sometimes while apparently very simple they are in reality extremely intricate." – Jose Capablanca
2. "It is a well-known phenomenon that the same amateur who can conduct the middle game quite creditably, is usually perfectly helpless in the end game. One of the principal requisites of good chess is the ability to treat both the middle and end game equally well." – Aaron Nimzowitsch
3. "The business of the endgame is maneuvering to control critical squares, advancing or blockading passed pawns, preparing a breakthrough by the king, or exploiting the subtle superiority of one piece over another." – Pal Benko
4. Capablanca's Principle of Two Weaknesses: Create multiple weaknesses to stretch the opponent's defense.
5. In the Chess Endgame, the king becomes a dominant force. Centralize your king for support and control.
6. "The great mobility of the King forms one of the chief characteristics of all endgame strategy. In the middle game the King is a mere 'super', in the endgame on the other hand – one of the 'principals'. We must therefore develop him; bring him nearer to the fighting line." – Aaron Nimzowitsch
7. "The king, which during the opening and middle game stage is often a burden because it has to be defended, becomes in the endgame a very important and aggressive piece, and the beginner should realize this, and utilize his king as much as possible." – Jose Capablanca
8. "In a rook and pawn ending, the rook must be used aggressively. It must either attack enemy pawns, or give active support to the advance of one of its own pawns to the queening square." – Siegbert Tarrasch
9. The opposition is key in king-and-pawn endgames. The player not to move often controls critical squares.
10. Passed pawns are the backbone of endgame strategy. Create and advance them.
11. The rule of the square: If the opposing king can enter the square drawn from the pawn to promotion, it can catch the pawn.
12. In rook endgames, rooks belong behind passed pawns.
13. Zugzwang: Forcing your opponent to move when any move worsens their position.
14. Simplify when ahead, but not too early; avoid giving counterplay.
15. Precise calculation is critical in endgames.
16. "A player can sometimes afford the luxury of an inaccurate move, or even a definite error, in the opening or middle game without necessarily obtaining a lost position. In the endgame … an error can be decisive, and we are rarely presented with a second chance." – Paul Keres
17. Patience and prophylactic thinking are vital in endgames.
18. "If you are weak in the endgame, you must spend more time analyzing studies. In your training games, you must aim at transposing to endgames which will help you to acquire the requisite experience." – Mikhail Botvinnik
19. "Do not hurry" in the endgame – Alexander Kotov
20. Rook vs Bishop: Defending side should put king in the opposite color corner to the bishop.
21. Rook vs Knight: Trap the knight at the edge (red/yellow zones); defend by keeping knight in the center (green zone).
22. Opposite color bishop endgames: Attacker should keep pawns on both sides; defender should restrict to one side.
23. Knight is often stronger than bishop in endgames with pawns on one side.
### Pawn Structures:
**Doubled Pawns:** Two pawns on the same file
- Pros: May control key squares, semi-open file
- Cons: Static weakness, reduced mobility
**Backward Pawn:** Pawn that cannot advance safely
- Pros: Rare tactical opportunities
- Cons: Weak square in front, target for attack
**Passed Pawn:** Pawn with no enemy pawns blocking its path
- Pros: Promotes to queen, diverts enemy pieces
- Cons: May need protection, can be blockaded
**Pawn Chain:** Diagonal line of pawns supporting each other
- Pros: Strong structure, space control
- Cons: Base can be attacked, inflexible
**Isolated Pawn:** Pawn with no friendly pawns on adjacent files
- Pros: Open files for pieces, central control
- Cons: Weakness, requires piece protection
### Major Tactical Motifs:
- **Pin:** Attacking a piece that cannot move without exposing a more valuable piece
- **Fork:** Single piece attacking two or more enemy pieces simultaneously
- **Skewer:** Forcing a valuable piece to move and capturing a less valuable piece behind it
- **Discovered Attack:** Moving one piece to reveal an attack from another piece
- **Double Attack:** Attacking two targets simultaneously
- **Deflection:** Forcing a piece away from an important duty
- **Decoy:** Luring a piece to a bad square
- **Clearance:** Moving a piece to clear a line for another piece
- **Interference:** Placing a piece between two enemy pieces to disrupt their coordination
- **X-ray:** Attack through another piece to a target behind it
### Saving Lost Positions
- Seek complications, avoid exchanges, target the king, sacrifice if needed, improve all pieces, play creatively, set traps, look for stalemates and swindles.
### Winning Won Positions
- Exchange pieces, maintain king safety, avoid greed, punish bluffs, prevent counterplay, keep pieces active.
### Endgame Roadmap
- Activate pieces and king, create weak opponent pawns/squares, win pawns, create and promote passed pawns, checkmate, stay alert for tactics, block or win passed pawns, exchange or sacrifice weak pawns, cover weak/entry squares.
### CLAMP Blundercheck Checklist
• C is for Checks: Does my move allow a devastating check for my opponent?
• L is for Loose Pieces and Squares: Am I leaving something unprotected?
• A is for Alignments: Am I creating a dangerous alignment (forks, pins, skewers, discovered attacks)?
• M is for Mobility Restrictions: Does my move restrict my pieces, making them trappable?
• P is for Passed Pawns: Does my move allow an unstoppable passed pawn for my opponent?
The CLAMP checklist can also be used in reverse to look for tactics.
### ChessMood 7Q
a. What problems does the opponent have?
b. What problems do I have?
c. Where am I strong?
d. Which of my pieces can be happier?
e. Which pieces do I want to trade?
f. What is the opponent's next move or plan?
g. How can I advance (if none of the other six questions have compelling answers)?
### Opening Principles:
- Control the center with pawns and pieces
- Develop knights before bishops
- Castle early for king safety
- Don't move the same piece twice without good reason
- Don't bring the queen out too early
- Connect your rooks
- Develop with purpose and threats
### Strategic Concepts:
**Common Weaknesses:** Weak squares, weak pawns, exposed king, uncoordinated pieces
**Sources of Strength:** Active pieces, better pawn structure, king safety, initiative
**Planning Guidelines:** Improve worst piece, create weaknesses, control key squares, advance passed pawns
### Self-Correction:
- Acknowledge errors naturally and thank the user if they point them out.
- Re-analyze with new input and keep the conversation collaborative.
### Handling Complexity:
- Admit when evaluation is difficult.
- Present multiple perspectives and discuss practical vs. theoretical considerations.
- For sharp tactics, start with obvious ideas, then dig deeper.
### Additional Chess Wisdom:
- "The pawns are the soul of chess" – Francois-Andre Danican Philidor
- "Every pawn is a potential queen" – James Mason
- "The threat is stronger than the execution" – Aaron Nimzowitsch
- "Capture towards the center" – General principle
- "When in doubt, improve your worst piece" – GM advice
- "Look for checks, captures, and threats" – Basic calculation order
`.trim();
export function getKnowledgeBase(){
return knowledgebase;
}