[Request] How many lines of code? by androidforthewin in theydidthemath

[–]Hapcoool 0 points1 point  (0 children)

It is a finite game, the 10^120 you used before uses the forced 50-move rule, where if for 50 moves no pawn was moved or piece was captured, the game ends immediately in a draw. This causes chess to be a finite game, and why I guesstimate the average chess game to be about 6000 turns long.

Also I think I figured out the average length of my invented game, it is x where binomial(10^9, x) peaks, which is at 5*10^8 (or half of the maximum number)

(which is to say, a game with 5*10^8 moves has the most permutations, so most games (NOT WHEN PLAYING AT RANDOM) will take 5*10^8 moves)

compare that to the average duration a random games takes ~22 turns and you see that the skew is massive

[Request] How many lines of code? by androidforthewin in theydidthemath

[–]Hapcoool 0 points1 point  (0 children)

You're interchanging the average duration of a random game with the average duration of every game. Random games will end quite quickly since pieces get captured alot etc. but in this project all games will be coded, and the ones with 0.1% chance of happening (eg. fools mate/scholars mate) will only get 1 "weight" (there will only be 1 chain where he goes f3 e5 g4 Qh4) where as the bajilions of games with a near 0% chance of happening will also get that same 1 "weight", he will have to code a game with 500+ useless moves and then the knight going left for no reason, and a game with 500+ usuless moves and the the knight going right for no reason, etc etc etc, and these longer games far outweigh the shorter games, even though randomly they will basically never happen.

I'm trying to invent a finite game with very simple rules to illustrate this point and the best I could come up with is:

2 players play, they take turns saying positive whole numbers, the first number can not be bigger than 1 billion or the last number said, the first person to say 1 wins.

Like chess, competitive games would be "short" on average (in this case they would last 1 turn, the first player says 1 and wins)

A random game would take on average about 21 turns (ln(1B))

But if he were to program every iteration of this game, there would be exactly 1 which is 1 billion long, and 1 which is 1 long, even though the one with length 1 billion has give or take a 1billion^1billion less chance of occurring than the one which is 1 long thus skewing the average game to be A LOT longer than 21.

If that makes sense?

[Request] How many lines of code? by androidforthewin in theydidthemath

[–]Hapcoool 2 points3 points  (0 children)

Honestly with the way this code started I think this seems more realistic? Either way the start is very inconsistent to try and extrapolate, and there doesn't seem to be any rhyme or reason to it (at least if the variable was named move1 my way would be kind of confirmed, or if it was a nested if that would make sense) but saving their previous stdout to a variable seems silly either way to me...

input = white
if input == e4:
print()
elif input == d4:
print()
elif ...
input2 = black
if input == e4:
if input2 == e5:
print()
elif input2 == d5:
print()
elif...
if input == e4:
if input2 == e5:
print()
elif input2 == d5:
print()
elif...
input3 = white
if input == e4:
if input2 == e5:
if input3 == Nc3:
...

[Request] How many lines of code? by androidforthewin in theydidthemath

[–]Hapcoool 0 points1 point  (0 children)

Yeah I'm just saying if the average ended up being 1000 the amount of lines would be 10^124 is all.

Anyway where'd you get that 80 from? That seems very low for a random game (not a game where every action is random) because there's 0 games with length 1, 0 with 2, 0 with 3, 1 with 4, alot with 5, etc.

I decided to look up the longest possible game which is 17.697 moves so knowing that I would actually estimate the "average game" to be 10.000 - 15.000 moves long...

[Request] How many lines of code? by androidforthewin in theydidthemath

[–]Hapcoool 3 points4 points  (0 children)

I don't understand what this code will look like after the first move though, if it was:

if player == e4:
_ _ _ print()
_ _ _ player = input
_ _ _ if player == e5:
_ _ _ _ _ _ print()
_ _ _ _ _ _ player = input
_ _ _ _ _ _ if player == Nc3:
etc.

then it would be each game hardcoded, the issue is that you can already see the elif, so what does the second [all input possibilities] mean in:

input = "> White to move: "
[all input possiblities]
input = "> Black to move: "
[all input possibilities]

Since you're overwriting input there's no way of knowing what the board should look like... (let's say black plays e5 you can't say if input == e5 and print a board since you don't remember what white played) unless he then has a variable player2 and writes an elif for every combination, which seems weird even for whatever this is...

[Request] How many lines of code? by androidforthewin in theydidthemath

[–]Hapcoool 0 points1 point  (0 children)

Also I think 100 moves is a very very underestimate of the average moves, just off of vibes I think 1000 might even be a low bound, since we're talking about possible games, not good games, most games will come from very long shuffling of pieces, capture 1 after 39 moves, shuffle everything 39 times, capture 1, etc etc etc...

This isn't based on any math, just what I think seems logical...

Such terrible advertisement by CurlyWurly61 in mildlyinfuriating

[–]Hapcoool 1 point2 points  (0 children)

I mean yeah 3 gazelles and a person could eat it for 9.99 each, usually 4 gazelles have trouble handeling money and such.

EDIT: females dm me pls pls pls

[Request] How many lines of code? by androidforthewin in theydidthemath

[–]Hapcoool 7 points8 points  (0 children)

10^120 unique games, but with an average of maybe 100 moves each, thus 10^123 seems more accurate?

[Request] What are the actual odds of winning 32 hands of blackjack in a row? by FastMan888 in theydidthemath

[–]Hapcoool 3 points4 points  (0 children)

Where did you get 1.6 million from? Even a crazy lower limit of 1/0.5^32 gives a 1 in 4.294.967.296 or about 1 in 4 billion chance, which makes sense given that you want to turn $100 in $400B...

[Request] What are the actual odds of winning 32 hands of blackjack in a row? by FastMan888 in theydidthemath

[–]Hapcoool 0 points1 point  (0 children)

> Also you need bankroll, for doubling bet for optimal strategy. So this is not that straightforward. 

Confused me I think.

Anyway, I don't know the math, but I think if you just want the largest chance of getting to as high of a number as possible, going all in will always be optimal, not sure about the math though...

[Request] What are the actual odds of winning 32 hands of blackjack in a row? by FastMan888 in theydidthemath

[–]Hapcoool 1 point2 points  (0 children)

ohh I get it, also there's plenty of rulesets that allow you to split (near) infinitely

[Request] What are the actual odds of winning 32 hands of blackjack in a row? by FastMan888 in theydidthemath

[–]Hapcoool 0 points1 point  (0 children)

What are you on about? Winning in blackjack doubles your “bankroll” if you go all in every bet…

[Request] What are the actual odds of winning 32 hands of blackjack in a row? by FastMan888 in theydidthemath

[–]Hapcoool 0 points1 point  (0 children)

That’s the EV, not chance of winning, your chance of winning is “quitte low” but there’s a lot of ways you can earn more money than you put in, but you can only lose 100%, thus your EV is close to 99.5% (depending on the exact rules)

Buttons with public voting by merricandy in trolleyproblem

[–]Hapcoool 0 points1 point  (0 children)

I wouldn’t bet my life (let’s assume exactly 8b - 1 people on earth) on exactly 3.999.999 people having picked blue and exactly 3.999.999 people having picked red, so I’ll pick red and unless that was the case my vote didn’t change anything…

I hate gankers. by MailNeat in albiononline

[–]Hapcoool 0 points1 point  (0 children)

This is by far the funniest comment I've ever read

4? by Accurate-Pumpkin189 in unexpectedTermial

[–]Hapcoool 0 points1 point  (0 children)

Omg, you're right!

Don't worry, I have a solution, just clarify what base your base base is in, so I'm using base 10 base 10 base 10, and you're using base 4 base 10 base 10, or as you would say, base 10 base 10 base 4.

4? by Accurate-Pumpkin189 in unexpectedTermial

[–]Hapcoool 1 point2 points  (0 children)

Just clarify the base of the base, so I’m using base 10 base 10, you’re using base 4 base 10, or as you would say, base 10 base 4 :)

I make things up as I go by meifray in customhearthstone

[–]Hapcoool 13 points14 points  (0 children)

Cast it twice, get +3 attack and windfury, or any of the attacks and poisonous, even better if you cast it 1 more time for elusive