Programming a personality

To start off, I have had a long day of work and I’m very tired but I won’t be able to sleep until I make this post. :puzzle:
So bare with me…

I have seen basic AI that just use ‘conditions’ such as ‘if’, ‘else’ etc but I was wondering if it was possible to program AI that is capable of learning. If this is possible, how would one go about doing such a thing.
The only two ways I could think of doing this is…

  1. To store strings of information in one big fat dirty database then having a wonder class that will do all the rest itself (i wish)
  2. To write new code into itself.
    I’m pretty sure that if 2 was possible, it would be considered a virus. (If its not true…blame pc-cillin…I learnt that from their site)

Obviously alot of this stuff would require the use of more…advanced (if you will) scripting languages such as java, c++.

Well…I totally forgot what I was getting to :a:

Ok…

Lets say we have a movie clip of a ball that randomly slides around the screen.
After 5 minutes, the ball realizes that my mouse spends most of its time sitting still on the bottom left corner, so it writes a function to keep the ball mc away from that area to prevent the ball from sitting ontop of any content.
Make sense?

Something like these examples/ideas must be possible if NASA can put a cool looking robot that basically thinks for itself.
On the other hand…I’m sure most people reading this don’t have a 10 billion dollar budget, so I’ll you a bit of slack :wink:

Anyway, I’m starting to not make sense so I shall retire to my bed. :smiley:

Please feel free to give any examples, ideas, tips + hints, limitations, links etc etc etc

Cheers

-OBCT

P.S - Try say the sentence below 5 times as fast as you can

“The O to the B to the C to the T”

Is anyone still interested or did we all jump off a cliff when the forum was down?

We need to get a list of formula’s and variables so we can put them into classes and get SOMETHING working :slight_smile:

Cheers

I’m interested. Just haven’t been at work lately (days off, finally :beam:), plus, I’m trying to rebuild my PC finally. I should be getting the DDR Ram I need today… hopefully (When I ordered the Motherboard, it never said DDR Ram, and I don’t have any… heh heh…)

OMG OMG OMG

http://home.swipnet.se/dungeondweller/development/dev00055.htm

Anyone who doesn’t read this will die a terrible death :slight_smile:

Yes, it’s based on action games but there are HEAPS of key concepts we really should use!!!

Have a look through and tell me what you think.

Cheers

http://www.cs.northwestern.edu/~forbus/c95-gd/lectures/The_Sims_Under_the_Hood_files/v3_document.htm

I’m on a roll tonight! :thumb:

Both of those are pretty awesome… didn’t have a chance to read through the SIMs one too much, but the other one was schweet. I think we can try to build our system to incorporate similar concepts, I kind of liked the “most urgent action”, which makes sense that certain things will cancel out the current desire of someone, for instance, if Ayumi is standing somewhere, and wants to go watch TV, but in the kitchen a fire is raging, she should determine that putting out the fire/calling the Fire Department/Escaping the House are more urgent than her desire to catch an episode of Law & Order.

I think we still need to kind of get things situated, so that we know what we’re doing… :slight_smile: OBCT, do you have some code that you’ve figured out, and like? Spirit, do you have some of your ideas put together so we can work with them?
I want to start typing up a type of Project Outline sometime soon, once we get the info together.
I’m looking into SourceForge.net, and it looks interesting, to say the least… as SOON as my PC is working, we’ll have a small server running, and I can send everyone links.

In the meantime, anyone have any ideas, on how to incorporate some of our recent ideas? I want to really start working on this soon… :beam:

Okay, so I was trying to read through the pages, and pages of documentation on SourceForge.net, on what they do, and how to submit new projects… it’s a lot of stuff, and its too crazy at work to be able to read through it… if anyone else has a chance, or has had experience in the matter, can you give us a bit of a condensed version? I plan on going through all of it eventually, probably when my PC is up, and we’ve basically got a bunch of descions to make. OBCT, I know you’re dedicated to the project, and I think Spirit is, too, so we need to get the 3 of us together (on-line, most likely), and work out all the kinks… if you want to send me your e-mails, please either PM me, or e-mail me: seifert@bahamutsoft.com, and I can work on getting things put together for us… I intend on building a site, and (unless someone else would be so kind…) I’m going to work on some project documentation, and then start on some coding/graphics work… phew… got some work ahead of us, don’t we… he he… :beam:
Okay, let me know your opinions, thoughts, ideas, etc… I’m going to lunch!

Yeah… I did jump of a cliff… thank goodness I survived, the forum’s back up :slight_smile:

Yes, I am still very into this, but I’ve been insanely busy lately helping out at my mom’s bakery from 3pm-9pm and school before that, by the time I get home, I’m wondering about life --
I only have time on the weekends basically, but maybe not for a week or two… I’m failing 3 classes and having an incomplete in one… haha… So I’m trying to pass two more classes, at least.
Anyway, I’m thinking of making a demo-like thing with the variables and all and some substitute formulas (until we get figure out real ones) when I can. Sorry of not being much of help -
-

Btw, I’m also busy with learning how to speak japanese… then I’d be quadlangual :D!

Hey, good luck man, any help you can offer is great, but don’t overdo it, at the expense of your sanity/health/grades… :beam:
If you want, you could always lend us a hand by contributing free baked goods… :smiley: :LOL:

Hi Everyone,

Sorry I havn’t been able to do much latly but work has been going CRAZY!!! :scream:
Stupid clients :stuck_out_tongue_winking_eye:

By monday, I’ll have (hopfully) had some rest and things at work will have settled down so I’ll make a start on some classes…or atleast some framework for them.

My email is
admin[at]wren-intermedia.com[/email]
or
adamwren[at]wren-intermedia.com

  • Replace [at] with @

I’m not sure how much everyone knows about OOP but inheritance is going to be VERY usefull in this project so keep that in mind.

In the mean time, if anyone gets a chance to write up a list of variables we’re going to use when a new character is created, that’d be great. It just saves me 10 minutes of reading through every post.

God I’m lazy lol.

Cheers

I’ll see what I can do.

OK… here goes:
Variables:



//Time

currentDate:Date; /*Is there a Date type in AS2.0?
                    I haven't really had a chance to look...
                    I hope there is...*/
currentTime:Time; /*I know there's a Time type, right?
                    (been out of AS for a while...)*/
intervalLength:Number; //Constant of how long an interval is.
secondsInterval:Number; /*Constant of how many intervals are in
one relative second to her world.
Example:  If an intervalLength is 100 1/1000 of a second to us,
and secondsInterval=10, then the program will act in RealTime.
But if we make secondsInterval=100, than the program will run
in 1/10 the speed of real-time (if my math is correct).
We can also change the intervalLength, and in theory, every Interval will be when we run any checks we need to run...
(we might want to reverse them, and have intervalLength=1000,
but have secondsInterval=.5, so that an intercval happens every
2 seconds.... or something...)*/

//Enviromental (Not nessecarily part of the Weather Function)

temperature:Number;
windDirection:String;
windSpeed:Number;
precipType:String;
precipNow:Boolean;

//Object (Copied from my earlier post)
class object {
        
        var name:String; // The Official name of the object, i.e.: "Ball", "Plate", "Television", etc.
        var ObjType:Number; // The type of object it is.  We'll have to
        // make a list of items: 1 = Toy, 2 = Food, etc.
        var ObjWeight:Number; // the weight of the object, Heavy
        // objects ae hard to lift, etc.  We can simplify this by have 'ranks' of
        // weight: 0=weightless, 1=light, 2=medium, 3=heavy, 4=immovable, etc.
        var ObjColor:String; // The general color of the object... I think we
        // can let her have a 'favorite' color and so she may like certain
        //things more than others based on the color.
}



//Character (Copied directly from OBCT's Post.)

class CreateCharacter
{
        // INITIAL VARIABLES
        
        // CONSTANTS
        var Name:String;	//Character's name
        var Gender:String;	//Characters gender/sex
        var Age:Number;		//Characters age
        
        // SEMI CONSTANTS
        var playfulness:Number; //The more playful, the happier she is, and the easier to ignore bad things.
        var arrogance:Number; //The more arrogant, the less she'll want to listen, and believe you.
        var cleanliness:Number; //How tidy she is.  higher rating means she'll try to be more organized
        var visciousness:Number; //Higher rating means she'll be more of a prankster, or just plain mean.
        var courage:Number; //Higher rating means that she'll be less likley to fear new things, or anything at all.
        var curiosity:Number; //Higher rating means she will be more inclined to try and learn new things.
        var obediance:Number; //Higher Rating will mean she listens, and obeys more than not
        var stability:Number; //Rates her abilty to keep to schedule.
        //if this is low, she may tend to forget doing daily or routine actions)
        var adaptability:Number; //Rates her ability to change depending on her environment.
        //If this is low, she may get confused if something suddenly changes.
        
        // CONSTRUCTOR FUNCTION
        function CreateCharacter()
        {
                this.ShowInfo();
        }
        
        // SET FUNCTIONS
        
        function setName(name:String):Void
        {
                this.Name = name;
        }
        
        function setGender(gender:String):Void
        {
                this.Gender = gender;
        }
        
        function setAge(age:Number):Void
        {
                this.Age = age;
        }
        
        function setPlay(play:Number):Void
        {
                this.playfulness = play;
        }
        
        function setArrogant(agro:Number):Void
        {
                this.arrogance = agro;
        }
        
        function setClean(clean:Number):Void
        {
                this.cleanliness = clean;
        }
        
        function setViscious(viscous:Number):Void
        {
                this.visciousness = viscous;
        }
        
        function setCourage(courage:Number):Void
        {
                this.courage = courage;
        }
        function setCurios(curios:Number):Void
        {
                this.curiosity = curios;
        }
        
        function setObediance(obediance:Number):Void
        {
                this.obediance = obediance;
        }
        
        function setStability(stability:Number):Void
        {
                this.stability = stability;
        }
        
        function setAdaptability(adaptability:Number):Void
        {
                this.adaptability = adaptability;
        }
        
        // GET FUNCTIONS
        
        function getPlay():Number
        {
                return this.playfulness;
        }
        
        function getArrogant():Number
        {
                return this.arrogance;
        }
        
        function getClean():Number
        {
                return this.cleanliness;
        }
        
        function getViscious():Number
        {
                return this.visciousness;
        }
        
        function getCourage():Number
        {
                return this.courage;
        }
        
        function getCurios():Number
        {
                return this.curiosity;
        }
        
        function getObediance():Number
        {
                return this.obediance;
        }
        
        function getStability():Number
        {
                return this.stability;
        }
        
        function getAdaptability(adaptability:Number):Number
        {
                return this.adaptability;
        }
        
        function getName():String
        {
                return this.Name;
        }
        
        function getGender():String
        {
                return this.Gender;
        }
        
        function getAge():Number
        {
                return this.Age;
        }
        
        // CLASS METHODS
        
        function ShowInfo():String
        {
                return "My name is " + this.Name + ", I am a " + this.Gender + " and I'm " + this.Age + " years old.";
        }
}

// This was rushed so save your critisism for tomorrow <img src="images/smilies/drool.gif" border="0" alt="">


It needs a little editing, but it’s a start.

Hahaha, I spent about 2 minutes trying to figure out where I’ve seen that script before :stuck_out_tongue:
Ahhhh…I’m too tired for this :slight_smile:

Tired? You posted at: 02-20-2004 12:04 PM
He he… it’s the middle of the day! Wake up, you!
Don’t give me none of that “Different side of the planet” crap… I know it’s the same time everywhere… “Time-Zones”… phwa! It’s a conspiracy made by the FAA, to trick people into paying for longer flights… :wink:

ahhem what is a1

(noobie spaeking)

*Originally posted by bombsledder *
**ahhem what is a1

(noobie spaeking) **

:h::h::h::h::h::h::h::h::h::h::h::h:

Does anyone here know OOP with AS2.0 and feels like giving me a hand? :puzzled:

I got bored of sleeping so I made a start…not nessicarily a good one :stuck_out_tongue:
Before I can really make any progress I need a second opinion so I’m not spending hours making a class that either won’t work or has no purpose.
(I’m not the most organised person you’ll ever meet)

Anyway, if anyones interested, let me know.

Cheers

Oops, I forgot to get rid of the image.

That class tree diagram won’t work because Flash doesn’t support multipul inheritance :frowning:

Hmm… can’t say I’m a guru on the AS2.0 OOP, but I know about OOP in general… We should start simple, and work from the most basic function. First, we should worry about how she’s going to work as an animal, what animal instincts are inherently built into her psyche before she even gets to worry about free-will. We need to start with the algorithms, and functions for Eating, Sleeping, Self-Preservation, and Waste Management (which I think we’ll need to include for any kind of realism)
Don’t worry so much about graphics yet, for right now, just give her a way to view her current status, and then show what she’s doing right then.

Once we have, basically, an animal mentality, then we can start building in the mental concepts that will come into play.

The general thing would end up with a screen, with a list of her current statusus, and a text box on the other side, which says: “Sleeping”, “Eating”, etc.
Make a way to edit her stats in real-time, and see what she does, like if we jack Hunger up to 100, she should switch straight to “Eating”, or whatever. then we can work from that as our base model.