Sequell Query (Pun Intended)


Problems running or configuring the software, commands & options, compiling, different platforms, using the interface, documentation, etc.

Crypt Cleanser

Posts: 723

Joined: Monday, 9th June 2014, 13:39

Post Wednesday, 5th August 2015, 03:45

Sequell Query (Pun Intended)

I'm not sure if this should go here or in coding, but erring on the side of caution drove me here.

My aim is to use !lg and !lm to derive player ghost statistics for my character. (See my comments in this thread.) This is what I've come up with so far.

Finding the number of games I played is trivial:
  Code:
!lg Aule * s=name
Spoiler: show
  Code:
<Sequell> 431 games for Aule (*): 431x Aule


Finding the number of times one of my characters was killed by a player ghost is also trivial:
  Code:
!lg Aule * s=ckiller
Spoiler: show
  Code:
<Sequell> 431 games for Aule (*): 34x a jackal, 29x a hobgoblin, 25x a kobold, 23x quitting, 20x a gnoll, 19x an orc priest, 17x an adder, 15x a player ghost, 10x a hydra, 10x Sigmund, 9x an ogre, 8x a giant gecko, 8x a giant mite, 7x an orc, 7x a goblin, 7x an orc warrior, 6x an ooze, 6x winning, 6x a bat, 5x an orc wizard, 5x cloud, 5x an unseen horror, 4x a worm, 4x a gargoyle, 4x a centaur warrior, 4x
<Sequell> a giant cockroach, 3x a quokka, 3x pois, 3x you, 3x a killer bee, 3x a worker ant, 3x Ijyb, 2x a raven, 2x giant spore, 2x an orc knight, 2x Joseph, 2x Snorg, 2x a sun demon, 2x an orc warlord, 2x a hill giant, 2x wild magic, 2x an orc high priest, 2x an ettin, 2x Crazy Yiuf, 2x a komodo dragon, 2x a fire giant, 2x an electric eel, 2x Terence, 2x an acid blob, 2x an ice beast, 2x a mummy, 2x
<Sequell> Pikel, a wolf spider, a sheep, Edmund, Nikola, a draconian, an oklob plant, a battlesphere, a boulder beetle, a storm dragon, a giant slug, a tengu reaver, a thorn hunter, an iguana, Prince Ribbit, a phantom, a crocodile zombie, Menkaure, a spiny frog, a sky beast, a guardian serpent, a sixfirhy, a phantasmal warrior, a spatial maelstrom, a merfolk javelineer, a smoke demon, a naga sharpshooter,
<Sequell> a wretched star, leaving, a wyvern, a wolf spider simulacrum, a centaur, a minotaur, a wight, a giant frog, a frost giant, a white imp, a spriggan berserker, an iguana skeleton, a redback, a very ugly thing, a shark, a shadow dragon, a death yak, a daeva, a salamander, a ghost moth, Nergalle, a gnoll sergeant, Mara (illusionary), a profane servitor, rotting, a demonic crawler, a shadow, a polar
<Sequell> bear, a manticore skeleton, Polyphemus, an orb of fire, Natasha, Maurice, Duvessa, Grinder, a bone dragon, something, a wolf, a freezing wraith, a vampire mosquito, a deep elf knight, a sickly siren, an enormous slime creature, a merfolk, a troll, a greater mummy, Saint Roka, a deep elf master archer, Nessos, a deep elf sorcerer


Less trivial is this one that tells me how many player ghosts my characters have killed (one person told me it couldn't be done):
  Code:
!lm Aule * type=ghost s=name
Spoiler: show
  Code:
<Sequell> 210 milestones for Aule (* type=ghost): 210x Aule


And this one fleshes out that number with a list of the player ghosts killed sorted by frequency:
  Code:
!lm Aule * type=ghost s=noun
Spoiler: show
  Code:
<Sequell> 210 milestones for Aule (* type=ghost): 3x 4d3d3d3, 3x pigah, 3x OzzY, 3x Avigdore, 3x russell, 3x stinju, 3x cmyk, 2x Stoog, 2x estick, 2x Sagaras, 2x Uniporpoise, 2x rumblealex, 2x Drestyn, 2x olowven, 2x LuckyNed, 2x Pyridrym, 2x Aule, 2x sCylight, 2x ender2012, 2x Saty, 2x suboptimal, 2x Flure, 2x cobaltphoenix, 2x gcw2014, 2x davidgn, Toby, subject, Sma, Jocendy, rEXpert, cartmanguy, silvan,
<Sequell> rickymista, TwoSpot, Ylca, Corinon, Feirund, lpapcke, cheetah7071, tali713, lemony, MaybeFactor, linjason, photon45, Dynast, Slacksy, Horhen, kurtweinstein, braveplatypus, JirkfaceJones, Blomdor, Boberling, filter, styxcanada, Chaglby, ch1llma, Shieldclock, B1inky, Grimgul, dbenoot, HideItInNarnia, p3fr, AKnight, FlamingLnfernal, mrpyro, Audax, droogie, JSHASKE, Manteiga, oatmealpacket, Wasian,
<Sequell> OctoMan, sabu, Neuromancer, Dalwyn, ksagri, tovical, ftvguy, Odds, btweinstein, renegade44, Angmar, kinazarov, Masupups, WanderingOmen, hurafacha, SentientBowtie, AAWatchnChat, Satonakaja, bigcatlittledog, Makr, Misha, XLukarX, newestuser, anastasiavixley, LuckViper, EugeneJudo, Darmok, DangerMomentum, Rontapazu, MIASMA, Wilberforcelj, Nagaseeker, susan, bombasticus, Otterlegs, flammie80, fits,
<Sequell> Leero, mustard, twillightdoom, Nosferax, Ghostwheel, DualCategory, jkartchner, geekworthy, Tegga21, Eliezar, syban, Darby, Naurwhale, Nikinyo, Alister, pfcuttle, soloincognito, Vell, jtj27, Taharka, KRYSIA61, royokou, colluphid, Kwzr, agriks, theElss, Kirito1, gilsham, Condegh, playitleo, Morek, panduro, ajbRad, Feedmeacat, Ozryem, lethediver, ragingrage, spilcher, AnswerOne, AmyChan, gerog,
<Sequell> NuclearButt, vicidius, zordon12345, Algernon, Manslay, zimbabwa, neonemesis, Freohr, Finwe, DarkMoon, ashaera, MB13, Ajonos, lallenlowe, edwinsage, ezmonkey, archon, destrovel, tocasia77, Kitty, Sbamiri, crux, Trullo, advil, aquaqua, EriktheRed, TheAlgebraist, cerealjynx, LarryBoy


Now, what I'd like to do is combine these into single expressions that produce the statistics I can derive from examining those results. For example, my ratio of games played (431) to ghosts killed (210) is roughly 2 to 1. Not bad, considering the number one ghost killer is ew with 4569 ghost kills over 40591 games, for a ratio closer to 9 to 1.

I'd also like to get the ratio of being a killer of to being killed by player ghosts, first by limiting the ckiller query to only those kills by player ghosts (which I don't know how to do), and then combining that into one expression with the number of character kills by ghost to arrive at my ratio of killing ghosts (210) to being killed by ghosts (15), or about 14 to 1.

I don't care how the result must be formatted. I'm pretty sure that it can't be returned as "2 to 1," but reversing the divisor/dividend and publishing the result as a decimal is just as well.

Any help here?

Zot Zealot

Posts: 1031

Joined: Friday, 26th April 2013, 19:52

Location: AZ, USA

Post Wednesday, 5th August 2015, 04:13

Re: Sequell Query (Pun Intended)

Probably the best place to ask is ##crawl-sequell.

For this message the author WalkerBoh has received thanks:
Aule

Crypt Cleanser

Posts: 723

Joined: Monday, 9th June 2014, 13:39

Post Wednesday, 5th August 2015, 04:39

Re: Sequell Query (Pun Intended)

Thanks! I had no idea that existed. I asked around in ##crawl earlier, but it's so busy, I may have missed it if someone mentioned it. It's not mentioned in https://github.com/crawl/sequell/blob/master/docs/listgame.md, my only guide on this thus far.

Dungeon Master

Posts: 388

Joined: Monday, 18th August 2014, 20:04

Post Thursday, 6th August 2015, 16:49

Re: Sequell Query (Pun Intended)

You'll get a more complete / sophisticated answer on ##crawl-sequell, but I think there are two things tripping you up. First, there isn't a way to do ratio queries where one side of the ratio is a milestone count, and the other is a game count; you have to either be dividing game counts by game counts, or milestone counts by milestone counts. Second, ratio queries do subset ratios, not pure division: given set A, what proportion of elements of A meet criteria B. So you could ask something like, what proportion of games did I kill a ghost, or in what proportion of games where I killed a ghost did I die to a ghost, but not a ratio that doesn't involve a subset or that involves mixing milestone vs game counts.

To do what you want to do you'll need command line expansions which support regular division (documented here). I've constructed a version of your second query as follows (edit, simplified based on some feedback from elliptic):

  Code:
.echo ghost kills to death ratio for advil: $(/ (float (!lm advil type=ghost fmt:"$n")) (!lg advil ckiller=a_player_ghost fmt:"$n")) to 1


(no guarantees that this is the best way to do it, or even perfectly correct.) If you don't cast one of them to a float it will return exactly the format you were asking about by the way.

In ##crawl-sequell (or just in ##crawl if the right people are paying attention) you could also get help on constructing a command out of this that would parametrize by the player name. Actually, a similar command could well already exist, there's lots of stuff in there (do `!cmd -ls` in a PM with Sequell to see.)
Last edited by advil on Friday, 7th August 2015, 16:37, edited 1 time in total.

For this message the author advil has received thanks:
Aule

Crypt Cleanser

Posts: 723

Joined: Monday, 9th June 2014, 13:39

Post Friday, 7th August 2015, 04:41

Re: Sequell Query (Pun Intended)

Awesome and extremely helpful information, so thank you very much. I tried reaching out in ##crawl-sequell after WalkerBoh sugggested it, but I got no response at the time. (I waited for a while, playing around the commands, so it wasn't wasted time.) I'll tinker around with your suggestions tomorrow. I'll report back after I've utilized your work. :)

I was on a tangent to this, trying (unsuccessfully) to get wget and grep to play nice in one easy command that would search my morgues directory for strings. I ended up doing them separately, but that's fine. It's no big deal to download them all and grep them on my machine. I used that data to search for the earliest noticing of a wizard in all my games, which was the topic of some comments in another thread.

Thanks again. Advil is always the best relief for a headache.

For this message the author Aule has received thanks:
advil

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 6 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.