quote:
Originally posted by Crichton
quote:
Originally posted by lostbowyer
I've tried verbot's "free" and '$10.00" version and there is no difference except you get a knowledgebase editor to create your own database. You can't select voices for your agents under xp (or at least I couldn't) and I don't see where the bot "learns" anything unless you edit the database.
Hal is still a much better program.....
Thanks for saving me the $10.00. I thought I was just missing something. I've been working on my Pilot MS Agent. Things are on pause until my birthday this month, when I hope to get a much needed memory upgrade. Try running a 3d modeling program in Win 2K with only 256 MB of memory. Yuk. I'm a member of the agentcharactors@yahoogroups.com, and they are talking about that Verbot AI.
I tried it. I tried the free version. I didn't like adding the .NET framework for the only program that uses it. I don't use .NET for anything else. Using Win 2K, I was able to change voices. And I liked that it used MS Agents. But, I never got it to learn anything. I didn't understand the weird scripting language or how it was done. then I discovered you need the pay version to even try.
Now I hear from you that it really doesn't learn anything? Then why would it be called AI? It is just another way to access a database. I thought that maybe the pay version had the learning capabilities. I'm glad you told us.
Hal is the best. Even if I do have to edit a brn file now and then to get a response I want. At least in general conversation, he can learn, and come up with some entertaining stuff. And I like making changes in the VB we all know and love.
Building a Stack Class Using VBScript
VBScript only provides a single built-in data type: the array. From that data type you can do a lot, though. Sometimes it's nice to have other data types, such as a linked list, stack, or queue. For those who are unfamiliar with these terms, let me take a moment to explain:
List: - An ordered collection of items. Each item in a list is "connected" to one another through some means, and a global reference exists to the starting item in the list. That way, to visit any other item in the list, the user can sequentially step through the list.
Queue: - An ordered collection of items that follows the following semantic: first in, first out. A queue has the following operations: enqueue and dequeue. When an item is enqueued, it is added to the queue, while a dequeue removes the item. The items are removed in the order they are added to the queue. So, if a queue had three items enqueued - A, B, and C - it would first dequeue A, then B, and then C.
Stack: - A stack is similar to a queue except it follows a first in, last out semantic. A stack, like a queue, has two operations: push, which adds an item to the top of the stack, and pop, which removes an item from the top of the stack. A stack is like a stack of cafeteria trays. When taking a tray, you are removing the tray that was last put on the stack. Therefore, if we pushed A, B, and C onto a stack, when we popped the elements off, we'd get C, B, and A, in that order.
using VBScript. If you are new to classes or unfamiliar with classes, let me strongly suggest that you read the following articles before continuing:
Using Classes within VBScript
VBScript Classes
a stack is a data structure that has a FILO (First In Last Out) semantic and methods to permit the user to add elements to the stack (push) and remove elements from the stack (pop). To help implement this, we will first create a more generic class, a weak list class, WeakList.
The WeakList class is called weak because of two reasons:
1.) It really isn't a list
2.) It only supports a small subset of methods and properties a true list should support.
A "real" list data structure contains a number of elements linked together to form a list. Rather than use this approach, we will use an array. To make things painfully easy, I will be reusing some code presented.
Sub AddHead(varItem)<--- Adds the varItem to the head (start) of the list.
Function RemoveHead()<--- Removes the head element of the list, and returns its value.
Sub AddTail(varItem)<--- Adds the varItem to the tail (end) of the list.
Function RemoveTail()<--- Removes the tail element of the list, and returns its value.
Function PeekHead()<--- Returns the value at the head of the list, without altering the list at all.
Function PeekTail()<--- Returns the value at the tail of the list, without altering the list at all.
The code for the WeakClass class is a little too long to post. It is available for downloading, though. The WeakList class should be placed in its own file (I chose to use WeakList.Class.asp and should contain a server-side include to import the contents of the file that contains the DynamicArray class.
Now that we have our list class, we are ready to create our stack class. As we'll see in Part 2, creating the stack class is insanely easy when using the WeakList class. In fact, our entire stack class is only ~35 lines long (including blank lines to enhance readability)!
http://www.4guysfromrolla.com/webtech/code/WeakList.Class.asp.html