Saturday, November 15, 2025
Wednesday, November 12, 2025
Wednesday, September 17, 2025
BrainVita / Marbles Solitaire Game
BrainVita / Marbles Solitaire Game
<p>After reviewing the states of the game I am thinking of reachability.. whether starting from initial state is it possible to reach a given state and can you reach any configuration given the same starting state.. also predict number of and position of remaining marbles in the end
What you are discovering is a deep property of peg solitaire / Brainvita: the game is not just about “making moves,” but about the structure of the state space.
Several important mathematical ideas arise naturally:
---
# 1. Reachability
Your question is:
> Starting from the standard initial state, can every board configuration be reached?
The answer is **no**.
Most conceivable configurations are actually impossible to reach.
The legal moves preserve hidden invariants, so the board is partitioned into “reachable” and “unreachable” regions.
This is why some positions may *look* close to a solution but are mathematically doomed.
---
# 2. State Space Graph
You can think of the game as a graph:
* each board configuration = a node
* each legal jump = an edge
Then solving the puzzle means:
> Find a path from the initial node to a final node.
The full graph is enormous, but highly constrained.
For the standard English cross board:
* total possible binary fillings ≈ (2^{33})
* but only a tiny fraction are reachable legally.
---
# 3. Position Classes (Very Important)
Peg solitaire has something called **position class theory**.
The board squares can be colored or labeled in modular patterns.
A move always changes these labels in constrained ways.
Therefore:
* some parity combinations can never occur
* some ending holes are impossible from certain starts
This is one reason why:
> Starting with center empty allows a 1-peg finish at center,
> but many other starts do not.
---
# 4. Predicting Final Marble Count
This becomes a conservation-law problem.
Each move:
* removes exactly 1 peg
* changes local geometry
If you start with:
[
N_0
]
pegs,
after (k) moves:
[
N = N_0 - k
]
So the parity of the number of pegs changes predictably.
But more interestingly:
## Geometry matters more than count
Examples of “dead” structures:
* isolated pegs
* edge traps
* disconnected clusters
* parity-locked regions
A configuration with 5 pegs may already be impossible to reduce further.
---
# 5. Can You Reach Any Configuration?
No.
This is equivalent to asking:
> Is the state graph connected?
It is not.
The graph breaks into disconnected components.
Some states:
* cannot be reached from the start
* cannot reach the goal
* can only appear in reverse play
---
# 6. Reverse Game Insight
A powerful method is:
## Play backwards
Instead of reducing pegs:
* start from final 1-peg state
* reverse jumps
* “grow” configurations
This reveals:
* which states are ancestors of a solution
* whether your current state lies in the solvable basin
This is how many optimal solvers work.
---
# 7. Computational Perspective
What you are thinking about is closely related to:
* graph search
* SAT solving
* combinatorics
* group invariants
* symbolic AI
* constraint propagation
A solver typically uses:
* BFS/DFS
* memoization
* symmetry reduction
* canonical board encoding
* transposition tables
---
# 8. The Deep Insight
You are moving from:
> “How do I solve this board?”
to:
> “What states are even theoretically possible?”
That is a transition from gameplay to mathematical structure.
This is exactly how research-level thinking begins in puzzles and algorithms.
---
# 9. One Famous Result
For the standard English board:
* Not every finishing hole is possible.
* Starting with center empty, ending at center is solvable.
* Some start/end combinations are provably impossible.
This can be shown using parity and pagoda functions.
---
# 10. Pagoda Functions (Advanced)
A pagoda function assigns weights to board positions.
A legal move can never increase total weight.
Therefore:
* if target state has larger weight than current state,
* it is unreachable.
This is a beautiful proof technique in peg solitaire theory.
---
You are very close to several computer science and mathematics topics:
* reachability analysis
* invariant theory
* game graph topology
* reversible computation
* search complexity
* combinatorial optimization
And Brainvita is actually an excellent laboratory for all of them.
Brainvita / Peg Solitaire
Click a marble, then click an empty hole two steps away in a straight line to jump.
Sunday, September 14, 2025
Friday, August 29, 2025
Circular D3.js Sunburst chart with bugs solved and new bugs introduced by GPT
Yearly, Monthly and Weekly Charts with drill down with bugs solved and new bugs introduced by GPT
Saturday, June 28, 2025
Normed Space and Banach spaces
Another curiosity arousal question here..
I was scared of the Hilbert Space and Curve until I saw this Video
I now have some fodder for my thoughts and a few more programs lined up to draw these types of space filling curves.
An idea that I was toying with struck now more deeply than earlier.

