Talk:Bucket inventory

From XKCD Wiki
Jump to: navigation, search

i tend to use the syntax "here, have a <item>" or "here, have <item>" so this won't parse under the current plans, i'll leave ya'll to decide if this is a problem or not.--jello_raptor

There are no instances of Bucket being addressed with this pattern in his logs, but it could be added to the pattern list once the base implementation is done. The pattern list will be flexible/editable one way or another.65.183.150.149Randall

Also, is it possible to ask Bucket to give a particular item to someone? Like in the phrase, "Bucket, give creature a heart." Or is this too complicated? --LolCam

In a way -- what you could do is give Bucket items, then say "Bucket: give creature something <action>gives creature $giveitem". The functionality you describe is not all that difficult but would have to be specialized, and it'd probably be best generalized as a feature where he replies to "Bucket, give <$nick> <$item>" with "<action> gives $item to $nick." or "<action> gives $nick $item." This would have some special cases and some broader cases it would want to cover -- and my example doesn't cover telling Bucket to give specific items to people. The reason for that is that I think saying "Bucket: give creature a bat." "* Bucket gives creature a bat." would get kind of boring, ultimately.
A similar question is discussed some in footnote #1; it gets surprisingly complicated.65.183.150.149 15:55, 12 October 2009 (UTC)Randall


I'd love to be able to teach Bucket how to use items, so that it's not just putting items in and taking them out. It'd be a much more generalized way of getting at what Lolcam is thinking. I'm not familiar with Perl so the syntax would almost certainly be different, but it would require the same basic pieces: address Bucket, tell him which item you're teaching behavior for, tell him what the name of the action is, and tell him what he should say/do. You'd end up with something similar to a factoid, but it only triggers when Bucket has the item, and triggering it would sometimes add/remove things from Bucket's inventory.

to teach him to read the note bucket, note <read> "Jello_raptor's fly is down. tee hee!" when someone says "bucket, read the note.", he'll respond by saying "Jello_raptor's fly is down. tee hee!"

to teach him to destroy the note bucket, note <destory> "Bucket shreds the note, then burns the pieces", -note when someone says "bucket, destroy the note.", he'll respond by saying "/me shreds the note, then burns the pieces" and removing the note from his inventory

to teach him to encode the note bucket, note <encode> "askif0_912'a ijl po asil. ntt htt!" -note +encoded_note when someone says "bucket, encode the note.", he'll respond by saying "askif0_912'a ijl po asil. ntt htt!", removing the note from his inventory, and put an encoded note in his inventory.

All the things you list can be created as factoids, so I'm assuming you mean teach him to do general verbs so he can substitute nouns as he wishes. So you can later say "read the letter" and he will know from being taught "read the note" that he should try reading the letter. I think this ends up being a difficult problem in computational linguistics.
But more importantly, Bucket is mainly a funny-replies bot, which is what the inventory is for. People are going to be putting stuff in and taking stuff out constantly, and so it would be a waste to train him to use an item he won't be carrying later. There's no reason to actually have him contain a sword just because one of his throwaway responses involves pulling out a sword. The containing items thing is really just a gag to let people make new jokes or set people up -- it's not like he actually has physical rules he has to follow. He can read a note to someone without having it. He has tons of factoids that refer to things he has/is carrying/etc. I don't think realism is important there; it would only get in the way having funny lines work. 65.183.150.149 20:04, 12 October 2009 (UTC)--Randall

Also, the operators are going to have the ability to lock Bucket's inventory and protect certain items from being removed or added, right? I feel like operator-controls should be a given, but the page doesn't mention them. Oct. 12 Same3chords

I'm not sure why this is important. He'll only be carrying five or at most ten items at a time (we don't want the inventory list to flood the channel) and all they're used for is substitution in factoids.


Regarding footnote 1: my personal solution for the "take this hammer and shove it up your ass" problem is to have a small list of recognized verbs (e.g. eat, shove, stuff, ram, throw, and so on) and just make sure to check for "take $item and $verb it.*$". If you wanted to protect against things like "take this hammer and go shove it up your ass", you can replace $verb with a suitable multi-word catcher like [\w\s]+ or [\w\s]+? (either should work). By the time you get to something that fits this exclusion but is still a legitimate item (I can only come up with examples like "Bucket, take this ham and cheese sandwich that knows its days are numbered"), you should probably be excluding those too. I haven't thought of a similar better rule for the 'to' problem, but as far as I can tell it's related to the presence or absence of the words 'that', 'which', and 'this'. Maybe if 'to' is detected, parsing with a DCG is in order? It's probably not worth it.