[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 - How does the PQI algorithm work?


How does the PQI algorithm work?

All things Desktop Dungeons

How does the PQI algorithm work?

Postby Tinker on Wed May 06, 2015 8:05 pm

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

Re: How does the PQI algorithm work?

Postby Lujo on Wed May 06, 2015 9:29 pm

I do know (or remember being vaguely aware) of more than that:

- It changes when you relog, folks don't talk about it much in case the devs went and changed that.
- It tries to avoid giving you the same class twice in a row regardless if you complete it, do the flame or relog.
- This seems to cause it to do strange things if you have, say, one class undone everywhere and everythign else rainbowed, as it'll then pick in a way which makes it look like it's "malfunctioning".
- It starts giving you vicious PQI's when there's about 70% difference between a vicious place and your least played regular one (or something like that)
- On my last run it also streaked Vicious non-stop even when I equalized it and only stopped after the update, but then it never gave me a vicious PQI again.

- I also seems to be stuck on Human Chemists
- It also seems to either count class challenges or I played waaaaaay too many humans, because I ran thorough the entire game just now and you can count my PQI humans in all classess togather on the fingers of one maimed hand (one human tinker).
- There might also be a bug of some sort which causes your least played thing to streak - it seems a bit impossible to me that the spread between Goblin Thief and every single other kind of thief there is to be 20+ for me even if I never played a Goblin thief before this playhtrough. I'd get it if it was vs. the three most played, but not 6.

What I don't know, but would like to:

- Exact formula
- Does it count failed runs
- Does it count challenges
- What's the deal with humans not showing up (is it really me or is something wrong, full playhtrough with 2 PQI humans felt strange)
- What's the deal with Chemists always being humans
- Why did it streak vicious for me and never give any after the update (even preffering rainbowed vicious to unraibowed regular places)
- What's the deal with (seemingly) 20+ Goblin Thieves. It did a simmilar thing to me with Dwarf Assassins on ap laythrouhg once before, and at one point it was impossible that I'd played every single other kind of assassin more than the Dwarf.


Also, I think there might be some weird behavior with it going on right now - it seemed to follow the "prioritize undone classess in places" logic pretty solidly for most of the playthrough, but now I had 2 rainbowed vicious dungeons and 3 Vicous places with varying levels of completion (all missing different classes), and it still gave me runs in the rainbowed ones.
Last edited by Lujo on Wed May 06, 2015 9:33 pm, edited 1 time in total.
I almost got pwned by Shifty Brickwork!
User avatar
Lujo
 
Posts: 3793
Joined: Tue Aug 02, 2011 8:47 am

Re: How does the PQI algorithm work?

Postby Sidestepper on Wed May 06, 2015 9:31 pm

In my last kingdom, I played PQI almost exclusively. Here are things that I noticed:

PQI selects dungeons based on the number of classes left, heavily favoring dungeons with more unplayed classes. The weighing is very strong. I would have kingdoms with, say, 13 classes done in every dungeon except one outlier with 12, and PQI would almost always pick the 12. The absolute lowest I've seen PQI go is two higher than the lowest dungeon, and that only happened twice out of the hundreds of quests I played.

PQI will happily pick the same dungeons several times in a row if that's what it takes. I unlocked Grimm's Grotto late and PQI insisted on 12 consecutive runs until it was up to a similar level of class completion as the others.

When choosing dungeons, PQI does not seem to care about badges. It selects based on class completion.

Vicious dungeons get a certain number of "virtual completed classes" that prevent them from dominating the PQI until much later in the game. I used to know the exact number, but basically V dungeons act as if they had something like 3-5 more classes completed than they really do. I'm not sure if this means that V dungeons will eventually drop off of PQIs radar entirely when everything is completed. There might be special case code to check for this, there might not. I never got that far.

After PQI picks a dungeon, it always selects a class that hasn't completed the dungeon, and it always selects a badge that hasn't been grabbed, assuming that any are left.

Beyond that, I think that PQI then just picks a race that hasn't beaten that particular dungeon with that particular class while getting that particular badge. DTD keeps a record of the runs we complete, even though it doesn't share it with us. I don't think it weighs race selection in any way other than to avoid duplicate runs. If you are getting lots of dwarves, it isn't because it thinks you need to play more dwarves, it's just the race that got picked at random. Since race isn't filtered the same way that badges and classes are, and because the number of race+badge+class+dungeon combos are so HUGE, your play history has a very tiny effect on race selection.
Sidestepper
 
Posts: 849
Joined: Mon Oct 03, 2011 12:36 am

Re: How does the PQI algorithm work?

Postby Lujo on Wed May 06, 2015 9:37 pm

^ About the last thing - there's no way it's random. Might have been once, but now it isn't - not doing a particular race-class has it streaking consistently, doing it means that the next time that class is slected it's gonna have you next least played race. It's just weird when it streaks the race (it's not impossible that the spread is huge, but it seems unlikely). The only instance which currently behaves differently is Human Chemist, which just always streaks, otherwise the least played race-class guy will keep streaking untill you even it up with the next least played and then those wil alternate untill it reaches the next one etc. But if you know the two least played ones are very close to each other you can practically predict which one will show up if you do the other one (you can reliably alternate Gnome and Elf Berserkers, Dwarf and Halfling Warlords, Gnome and Elf Priests and never have others show up at all etc etc).

Most of my playhtrough was either flames or PQI with a strong preference for PQI and only using the flame to change it if I really didn't feel like playing a particular PQI. If what I just wrote doesn't work exactly like that, it's very close to that.

I've even done this - saw a race-class where I know which the next one was gonna be, like Halfling Warlord and Dwarf Warlord, then done the current one in a Flaming Dungeon and this resulted in getting the other one to show up for the next Warlord PQI like clockwork. Otherwise the next time PQI chose Warlord it would be a halfling (unless they were equal).
Last edited by Lujo on Wed May 06, 2015 9:45 pm, edited 1 time in total.
I almost got pwned by Shifty Brickwork!
User avatar
Lujo
 
Posts: 3793
Joined: Tue Aug 02, 2011 8:47 am

Re: How does the PQI algorithm work?

Postby Sidestepper on Wed May 06, 2015 9:43 pm

Sidestepper
 
Posts: 849
Joined: Mon Oct 03, 2011 12:36 am

Re: How does the PQI algorithm work?

Postby Lujo on Wed May 06, 2015 9:46 pm

There is a thread called "another bloggy playthrough thread" it has hundreds of runs in it. It's basically what I did with all my spare time for several months now, evening out my PQI to chase laggy race/class combinations and reserach stuff I haven't played much at the same time. It worked. I mean, it's not confirmation bias I was actively sucessfuly metagaming it every single run, and my run choices were primarily guided by this principle. The only exception seemed to have been the Goblin Thief who streaked on me a million times but it's not actually impossible that the spread between that combo and any other thief combo was that large.

I might be wrong about some parts of it, though, there might be more to it, but playing it as if that was right seemed to produce expected experimental results. Could give you dozens of examples, really. There might be something to the "choses the race you haven't completed that particular dungeon with that class" but I'm not sure why this would be so, that wold make it terribly streaky.

Also streaky in a hugely annoying way, where you'd be set up not just with your least played race for a class, but the race you enjoy to play with the least even if it's not your least played race with that class. Meaning that even if you go against what you like to do and play some, say Goblin Thieves on purpose to get them out of the PQI, the game would still insist you do it more than anything else one every dungeon in the game before something else could show up in the PQI for that dungeon and that class. Which is... well, very suicidal if you want to have satisfied customers. Nobody in their right mind would make it work like that. PQI always being the least played race for a class is allready asking too much from the average person (or most people), but can kinda be compensated by money or even curiousity, the other way arond would be just clinically sociopathic. Like for real, not hyperbole, just think what that would be asking from a player in terms of time investment into somethign they obviously don't want to do in the first place, how it would reflect on the functionality of that feature etc. Keeping the first thing varied is possible, keeping the other thing varied would take a million playthroughs all played in a way you're least inclined to want to play it and most people burn out before even managing one regular one.
Last edited by Lujo on Thu May 07, 2015 10:42 am, edited 5 times in total.
I almost got pwned by Shifty Brickwork!
User avatar
Lujo
 
Posts: 3793
Joined: Tue Aug 02, 2011 8:47 am

Re: How does the PQI algorithm work?

Postby Tinker on Wed May 06, 2015 10:01 pm

I'm not playing PQI that often (I'd say, maybe every 3rd/4th run I do will be a PQI). My kingdom is close to completion. I'm currently missing 2 classes on Namtar's Lair; 7 on Vicious Steel; and a whole lot on VGT. Everything else is rainbowed.

The PQI seems to behave for me the following way (without having studied it carefully or logging it):

1. PQI almost always picks one of the Vicious dungeons. Only rarely do I get a non-vicious one. It never picks Gaan-Telet or Vicious Gaan-Telet, but does choose from all other maps. I do not notice a massive dominance for those maps that I haven't rainbowed yet... i.e. it's not like I get Namtar's and VS in alternation, but it seems like, I get just as many Dragon Isles, and Naga Cities, and Demonic Libraries (which are all rainbowed) as Namtar's or VS.
2. If it picks a dungeon where I'm missing a class, it picks a class from among the missing ones (probably at random); otherwise, it picks a class at random (or maybe weighted somehow, certain classes do seem to show up more/less often, but this may be just perception...).
3. Standard classes also get a race, and I've no clue how this is picked. I do seem to see a lot of "oddball" combinations, i.e. when I was avoiding Goblins like the plague, I did notice an abundance of Goblins in the PQI. Which did lead me to believe that somehow PQI will try to get you to play a race you haven't played. Again, not documented, just feeling.
4. Badge follows class selection logic, i.e. if some badges are missing, it picks one of those, otherwise seems to pick just something.
"Thinker", just without the "ache".
User avatar
Tinker
 
Posts: 2000
Joined: Fri Oct 31, 2014 8:51 am

Re: How does the PQI algorithm work?

Postby Tinker on Thu May 07, 2015 4:33 am

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

Re: How does the PQI algorithm work?

Postby grimskallen on Thu May 07, 2015 7:26 am

As a side point:
I once had a PQI be The Labyrinth as gorgon with the warmonger badge, I do believe this one is impossible due to stoned enemies (not crushable due to warmonger) blocking hallways.

I tried experimenting with prepping Bear Mace, Agnostics collar and Binlor to work around this, but got screwed by early-game RNG.

Edit: Tried it again and didn't get screwed from the very start, like I did the first time I played the PQI, definitely doable, just presents limited ways of doing it and is tedious.
Last edited by grimskallen on Wed Jun 10, 2015 8:20 am, edited 4 times in total.
grimskallen
 
Posts: 18
Joined: Fri Feb 08, 2013 6:46 pm

Re: How does the PQI algorithm work?

Postby Lujo on Thu May 07, 2015 10:26 am

It is actually doable with Bear Mace and Binlor, at least it used to be, but probably not without the Dragonshield. If you do the Flaming run it will reset the PQI (or just relog).
I almost got pwned by Shifty Brickwork!
User avatar
Lujo
 
Posts: 3793
Joined: Tue Aug 02, 2011 8:47 am

Next

Return to Desktop Dungeons

Who is online

Users browsing this forum: No registered users and 4 guests