[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 390: preg_replace(): 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
[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 Fri Nov 27, 2015 2:14 pm

Well, I got curious about the probability to see an item appearing in a dungeon, so I calculated the probabilities for every item (all items unlocked, no preparations, no veto, 8 shops):


EDIT:
Wondering about the influence of removing items and adding a shop. Note, that you have to insert the items yourself, depending on which were removed (either by vetoing or by prepping it).

all items unlocked, 4 items removed, 8 shops:


all items unlocked, 8 removed, 9 shops:
Last edited by Gakato on Fri Nov 27, 2015 2:39 pm, edited 2 times in total.
Gakato
 
Posts: 118
Joined: Mon Dec 30, 2013 10:31 pm

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

Postby ~'(^ + ^)'~ on Fri Nov 27, 2015 2:19 pm

@Gakato:

So, just curious, don't all items have equal probabilities? I mean like it's "random" isn't it?

Why is Elite Items more rare? If they are all in the same "big bucket"?
User avatar
~'(^ + ^)'~
 
Posts: 774
Joined: Wed Mar 05, 2014 2:51 pm

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

Postby Gakato on Fri Nov 27, 2015 2:23 pm

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

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

Postby ~'(^ + ^)'~ on Fri Nov 27, 2015 2:30 pm

@Gakato:

Ok, so am I right to say if the algo uses just taking a number from 0 to n-1 then all items would be equally possible?

This is so "intriguing" to me, like isn't squaring a number then taking the square root (inverse of the first function) makes the "range" of possible numbers back to the same 0 to n-1. Not sure I am talking sense now, but I just feel like wow, just doing this "extra" steps will make the algo favour small numbers.

[Thought about it a little, so basically rolling a 0 from the 0 to n squared, will give the last item, so "the bigger" indices are rarer because lesser numbers will map to it]
User avatar
~'(^ + ^)'~
 
Posts: 774
Joined: Wed Mar 05, 2014 2:51 pm

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

Postby Gakato on Fri Nov 27, 2015 2:46 pm

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

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

Postby ~'(^ + ^)'~ on Fri Nov 27, 2015 2:51 pm

User avatar
~'(^ + ^)'~
 
Posts: 774
Joined: Wed Mar 05, 2014 2:51 pm

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

Postby Tinker on Fri Nov 27, 2015 4:39 pm

Wow you guys really like to talk dirty... :P
"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 ~'(^ + ^)'~ on Fri Nov 27, 2015 4:49 pm

User avatar
~'(^ + ^)'~
 
Posts: 774
Joined: Wed Mar 05, 2014 2:51 pm

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

Postby Darvin on Fri Nov 27, 2015 5:23 pm

User avatar
Darvin
 
Posts: 4355
Joined: Thu Jun 02, 2011 1:44 am

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

Postby Tinker on Mon Dec 07, 2015 1:45 pm

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

PreviousNext

Return to Desktop Dungeons

Who is online

Users browsing this forum: No registered users and 22 guests