Categories: GuidesValheim

How much Dark Forest do I have to explore to find Haldor? An estimate

Last night I made an estimate of the chance of finding haldor given that x% of the Dark Forest biome has been explored. The valheim wiki ways haldor has ten spawn locations. I think this is a conditional tree problem. I read the khan academy tutorial last night and wrote some python code to solve the problem:

import sys

def printf(format, *args):
    sys.stdout.write(format % args)

Area=10000000
Treasures=10

def p(i):
    return 1.0*Treasures/(Area-i)

i=1
foundaccumprob=0
notfoundprob=1
breakpoint=0.1
while True:
    foundaccumprob = foundaccumprob + p(i)*notfoundprob
    notfoundprob=notfoundprob*(1-p(i))
    if foundaccumprob > breakpoint :
        printf ("%7d   %7.4f n", i*100/Area, foundaccumprob)
        breakpoint = breakpoint + 0.1
    if i == (Area-1) :
        printf ("%7d   %7.4f n",i,foundaccumprob)
        break
    i=i+1

"Treasures" are the number of spawn locations. "Area" is set to 1M but some experimentation shows that the area really doesn't matter … that is to say if I double the area obviously it will take longer in the game to explore 20% of it, but if I explore 20% of a 1000 tile map or 20% of a 1M tile map the chance of finding Haldor remains. Here are the results I calculated …

https://preview.redd.it/neoj3j1rpqv61.png?width=554&format=png&auto=webp&s=55a432a21deea3c769c46df617f9d6baf9441e5f

ie, if Haldor has ten spawn locations and i have explored 6 percent of the total dark forest biome then I should have a 50% chance of finding Haldor. If I explore 11 percent of the dark forest, then the chance of finding haldor increases to 70%. In fact, at only one fifth of the dark forest biome explored I have a 90% chance of finding haldor.

We all know that the map is really big, but giving Haldor ten spawn locations drastically reduces the amount of biome we have to explore to find haldor.

Let the flames begin ….

Gamer

Share
Published by
Gamer

Recent Posts

Ledx have been so hard for me this wipe

Not being able to craft them sucks. Especially when everyone I talk to about it…

5 months ago

My interesting and unfortunate Gwent life

First I'd like to say I absolutely love this game it's quality. Basically I first…

5 months ago

Teacher Tuesday 12/Dec/2023 – ask your questions here!

Welcome to Teacher Tuesday, a thread where anyone can ask any type of question without…

5 months ago

This games balance is confusing

I’m kind of new/returning to gwent I played beta and obviously it’s a lot lot…

5 months ago

Summary of 10 Days of Draws from Chaffee’s Bundles

Level 1 Bag (Free with Atmosphere Level 2) 6 small consumable (First Aid, Repair, Fire…

5 months ago

Why is my crew at 135%?

Here's my crew - T34-85M - for the life of me I cant figure out…

5 months ago