Post

Golden Octopus Probability Simulation

=== 100,000 Simulation Result Statistics ===

 

Average Attempts: 85.75

Number of Escapes: 27570

Average Final Level: 4.95

 

Statistics by Level:

Level 1:

Average Stays: 1.00

Minimum Stays: 1

Maximum Stays: 1

Reach Probability: 1.0000 (100.00%)

Level 2:

Average Stays: 2.66

Minimum Stays: 1

Maximum Stays: 7

Reach Probability: 1.0000 (100.00%)

Level 3:

Average Stays: 7.83

Minimum Stays: 2

Maximum Stays: 22

Reach Probability: 1.0000 (100.00%)

Level 4:

Average Stays: 22.64

Minimum Stays: 4

Maximum Stays: 53

Reach Probability: 1.0000 (100.00%)

Level 5:

Average Stays: 36.75

Minimum Stays: 6

Maximum Stays: 73

Reach Probability: 1.0000 (100.00%)

Level 6:

Average Stays: 13.45

Minimum Stays: 0

Maximum Stays: 53

Reach Probability: 0.9738 (97.38%)

Level 7:

Average Stays: 1.21

Minimum Stays: 0

Maximum Stays: 23

Reach Probability: 0.3058 (30.58%)

Level 8:

Average Stays: 0.17

Minimum Stays: 0

Maximum Stays: 19

Reach Probability: 0.0469 (4.69%)

Level 9:

Average Stays: 0.03

Minimum Stays: 0

Maximum Stays: 18

Reach Probability: 0.0062 (0.62%)

 

 

Maximum Expected Reward:

Level 7: Highest at 305.80.

A balance between a 30.58% reach probability and a 1000 reward.

 

Attached code below

import random

 

# 레벨별 성공/실패/도망 확률

transition_probs = {

1: (1.0, 0.0, 0.0),

2: (0.6, 0.4, 0.0),

3: (0.5, 0.5, 0.0),

4: (0.4, 0.6, 0.0),

5: (0.307, 0.693, 0.0),

6: (0.205, 0.765, 0.03),

7: (0.103, 0.857, 0.04),

8: (0.05, 0.90, 0.05)

}

 

def simulate_once(max_attempts=100):

current_level = 1

level_counts = {i: 0 for i in range(1, 10)} # 각 레벨 머문 횟수

level_counts[current_level] += 1 # 초기 1레벨 카운트

 

for attempt in range(max_attempts - 1): # 첫 시도 포함하므로 -1

if current_level not in transition_probs: # 9레벨 도달 시 유지

level_counts[current_level] += (max_attempts - attempt - 1)

break

success_prob, fail_prob, run_prob = transition_probs[current_level]

outcome = random.random()

if outcome 0:

level_stats[level]['reached'] += 1

 

# 통계 계산

print("=== 시뮬레이션 10만 번 결과 통계 ===")

print(f"Average Attempts: {sum(attempts_list) / num_simulations:.2f}")

print(f"Number of Escapes: {sum(1 for a in attempts_list if a

메이플스토리 인벤 팁과노하우안녕내이름
2025-02-20

메이플인벤메이플스토리인벤팁과노하우게시판메이플메이플스토리