Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

nikiigo/DrunkMan

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
5 Commits
 
 
 
 

Repository files navigation

Drunk Man Random Walk Simulation

Monte Carlo simulation of a biased random walk near a cliff edge.


Overview

This project simulates a stochastic process:

A drunk man performs a random walk along a line and may fall off a cliff.

The simulation estimates the probability of survival over multiple trials.


Model Description

The system is modeled as a 1D random walk with an absorbing boundary.

State

  • Initial position: 2
  • Position 0 represents the cliff (fall)

Transition Rules

At each step:

  • Move toward the cliff (-1) with probability 1/3
  • Move away from the cliff (+1) with probability 2/3

Termination Conditions

A simulation run ends when:

  • The man reaches position 0 → fall
  • The number of steps reaches 1000 → treated as survival

Parameters

  • Runs: 10000
  • Probability toward cliff: 1/3
  • Initial position: 2
  • Max steps: 1000

Output

The program prints:

  • Survival ratio (approximate)
  • Rational approximation of survival probability

Example:

experimental result: saves ratio = 0.73 ratio = 73/100


Key Insight

Because the walk is biased away from the cliff, the probability of survival is greater than zero.

This differs from symmetric random walk where eventual fall probability is 1.


How to Run

python main.py


Author

Igor Nikitin

About

Monte Carlo simulation of a biased random walk with an absorbing boundary, estimating survival probability under asymmetric drift.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.