I would like to suggest a new block. How about <list includes [ ]>? In other words, a block to sense if an item in a list includes something. Don't get this block confused with the <list contains [ ]> because that block already exists in 1.4 and it checks if a whole item in the list contains something. The difference is that the 'contains' block would sense 'Hello World' in the item of 'Hello World', but the 'includes' block would also get the 'Hello' and 'World' in 'Hello World', along with 'Hello World'.
This may sound useless, but think of the possibilities! It would be so much easier for a chatbot, and things like that.
Last edited by Jonathanpb (2010-01-08 19:59:39)
Offline
Hmm... very handy for chatbots like you said. If you wanted to sense if you were being asked your favorite color, you could be asked the following:
What's your favorite color?
What is your favorite color?
Whats your favorite color?
What's your fave color?
What is your fave color?
Whats your fave color?
etc....
Instead of having a lot of <__ or __> blocks, you can just transfer the answer to a list that checks the replies, so:
.............................
if (list check contains [favorite color]) or (list check contains [fave color]) or (list check contains [fav color])*
add (_____________) to [chat]...
... which should be very handy for chatbots.
*New line; not anything about the scripting.
Last edited by Chrischb (2009-07-16 00:15:56)
Offline
BWOG wrote:
Ok, but I think 8 year olds might get confused between the two.
How about this. They rename the blocks so the block that exists is <[item] of list is [ ]>, and the block that I want is <[item] of list includes [ ]>.
Chrischb wrote:
Hmm... very handy for chatbots like you said. If you wanted to sense if you were being asked your favorite color, you could be asked the following:
What's your favorite color?
What is your favorite color?
Whats your favorite color?
What's your fave color?
What is your fave color?
Whats your fave color?
etc....
That's the handy thing that I was talking about earlier. Nothing special.
Last edited by Jonathanpb (2009-07-19 04:13:03)
Offline
There are a lot of projects I had to abandon because this block doesn't exist. But I would change it to: () contains () at [] so you could make it a variable, list, etc. and the [] contains: Front, back, middle and anywhere.
Offline
Tux wrote:
There are a lot of projects I had to abandon because this block doesn't exist. But I would change it to: () contains () at [] so you could make it a variable, list, etc. and the [] contains: Front, back, middle and anywhere.
Now that's an idea!
Offline
Tux wrote:
There are a lot of projects I had to abandon because this block doesn't exist. But I would change it to: () contains () at [] so you could make it a variable, list, etc. and the [] contains: Front, back, middle and anywhere.
That's awesome! There's just one problem though: lists are different from variables, so a list might have [list includes ___ in [item], while variables might have [variable includes ___].
Chrischb wrote:
Now that's an idea!
I agree with you. Nothing big.
Last edited by Jonathanpb (2009-07-31 02:43:34)
Offline
I have a project that doesn't work properly because there isn't this block. I have to use repeat (legnth of ((item 1) of list) and it would be great if there was a block in the variable/list section repeat (legnth of (item 1) of list)
Last edited by grit96 (2010-01-07 07:48:26)
Offline
Hi grit96,
I think you might just try the green (length of [ ]) reporter block in the Operators section for what you're after. You can drop the (item (i) of (list)) block into the rectangular argument slot and that should work. If that doesn't help, please ask again!
Offline
BWOG wrote:
Ok, but I think 8 year olds might get confused between the two
An 8 year old with a mental disorder might, but an ordinary one won't.
And I think this would be a good idea to add!
Last edited by juststickman (2010-01-07 12:31:04)
Offline
Jens, hi! You don't usually post in places like this.
I remember when I saw your Eliza; before that, I couldn't think of how you could get around the lack of the <list includes [ ]> block. Anyway, I figured out how to do it...
I still want that block, though. It saves a lot of work (and plenty of variables), and, well, it would make chatbots think a lot faster.
Offline