[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 120: preg_filter(): The /e modifier is no longer supported, use preg_replace_callback instead
QCF Design Community • View topic - Ok, so how does the shop algorithm actually work?


Ok, so how does the shop algorithm actually work?

All things Desktop Dungeons

Re: Ok, so how does the shop algorithm actually work?

Postby Gakato on Mon Dec 07, 2015 2:47 pm

Well I'm not that mathsy, though I'm pretty sure there is no simple way to calculate the cumulated probabilities for every single item to appear in a dungeon. At least for me it was much easier and faster to just count the chosen items in one billion dungeon runs and calculate the probabilities based on that. :)
Gakato
 
Posts: 118
Joined: Mon Dec 30, 2013 10:31 pm

Re: Ok, so how does the shop algorithm actually work?

Postby William on Mon Dec 07, 2015 3:35 pm

"Because Goatperson"
User avatar
William
 
Posts: 719
Joined: Tue Jun 16, 2015 10:52 am
Location: Port Elizabeth, South Africa

Re: Ok, so how does the shop algorithm actually work?

Postby Tinker on Mon Dec 07, 2015 4:14 pm

"Thinker", just without the "ache".
User avatar
Tinker
 
Posts: 2000
Joined: Fri Oct 31, 2014 8:51 am

Re: Ok, so how does the shop algorithm actually work?

Postby dislekcia on Mon Dec 07, 2015 4:28 pm

That little square root really messes with permutations, doesn't it ;)
User avatar
dislekcia
 
Posts: 2321
Joined: Fri Mar 25, 2011 5:58 pm
Location: Cape Town, South Africa

Re: Ok, so how does the shop algorithm actually work?

Postby Gakato on Tue Dec 08, 2015 9:02 am

Gakato
 
Posts: 118
Joined: Mon Dec 30, 2013 10:31 pm

Re: Ok, so how does the shop algorithm actually work?

Postby Astral on Tue Dec 08, 2015 3:29 pm

This is a pretty interesting topic :)

Like most statistical problems this one isn't difficult either, just tediously long to calculate. That's why Gakato's approach is clever, it's much easier to simulate it and collect the data.

First, I have a question. Shouldn't rule 6 say 'subtract from n'? Otherwise we can get a -1 index, and the list goes 0-37.

Btw I started constructing an equation for this problem, but without some programming it will be useless. I can already see that the final form will be monstrously long, containing plenty of sums to expand and around 3600 unique factors.
You couldn't even showcase such a big equation, let alone work with it. That's for 8 shop dungeons, with each extra shop added the number would increase exponentially.

I will try to make a table collecting the exact probabilities, but can't promise a condensed equation.
Somebody spilled raspberry juice all over the place!
User avatar
Astral
 
Posts: 562
Joined: Fri Jan 17, 2014 10:56 pm

Re: Ok, so how does the shop algorithm actually work?

Postby Tinker on Tue Dec 08, 2015 7:35 pm

"Thinker", just without the "ache".
User avatar
Tinker
 
Posts: 2000
Joined: Fri Oct 31, 2014 8:51 am

Re: Ok, so how does the shop algorithm actually work?

Postby Gakato on Tue Dec 08, 2015 8:34 pm

Gakato
 
Posts: 118
Joined: Mon Dec 30, 2013 10:31 pm

Re: Ok, so how does the shop algorithm actually work?

Postby Phoil on Wed Dec 09, 2015 8:47 am

Phoil
 
Posts: 19
Joined: Thu Sep 03, 2015 10:06 am

Re: Ok, so how does the shop algorithm actually work?

Postby Astral on Wed Dec 09, 2015 1:55 pm

No probs and thanks for clearing that up :)

Though that means at best we can only generate the item in the slot n-1-0, so it's impossible to pull the last one. Has anyone found a Zot in the shop without elite items prepped or the Witchalok Pendant when elites were on?


I don't want to hype you up too much Tinker, it's taking long to solve, I'm only done with the mechanics of the 1st 4 shop yet. And it's only getting harder from here. Also a little tweaking is necessary, cause I assumed we subtract the random number from n, not n-1.
Somebody spilled raspberry juice all over the place!
User avatar
Astral
 
Posts: 562
Joined: Fri Jan 17, 2014 10:56 pm

PreviousNext

Return to Desktop Dungeons

Who is online

Users browsing this forum: Bing [Bot] and 220 guests