Post
Topic
Board Bitcoin Discussion
Re: Bitcoin puzzle transaction ~32 BTC prize to who solves it
by
WanderingPhilospher
on 21/04/2025, 05:57:54 UTC
Where at?
Sorry I meant mcd script

Ok, now in Python for better understanding.

Thanks, there is still one flaw :
By counting only "wins" you miss one very important piece of data : how fast was a method compared to the other on each simulation ? A win 5x faster does not have the same value as a win 1.2x faster.
This can be changed by summing the number of checks made over all the simulations, like this :

Code:
results = {"sequential": {"wins": 0, "checks": 0}, "precise": {"wins": 0, "checks": 0}, "ties": 0}
...
results["sequential"]["checks"] += seq_result["checks"]
results["precise"]["checks"] += pre_result["checks"]
.....
Sequential: {results['sequential']['checks']}
Prefix: {results['precise']['checks']}

Code:
=== Configuration ===
Total numbers: 100,000
Block size: 5,000
Prefix: 3 characters (16^3 combinations)
Simulations: 1000

Wins:
Sequential: 421 (Average Win Margin: 42.18%)
Prefix: 536 (Average Win Margin: 38.79%)
Ties: 43

Code:
=== Configuration ===
Total numbers: 1,048,576
Block size: 4,096
Prefix: 3 characters (16^3 combinations)
Simulations: 1000

=== FINAL RESULTS ===
Wins:
Sequential: 358 (Average Win Margin: 41.54%)
Prefix: 639 (Average Win Margin: 36.54%)
Ties: 3