News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
Author Message

Posts: 231
Group: Moderators
Joined: Apr 2007
Status: Offline
Reputation: 0
Post: #1

A really dumb psychology simulator.
Derived from psychic-ologist (for BASIC) by Nathan Wittich

AI_RESPONSE={"what does that make you think?"
,  "have you thought much about the end result of that?"
,  "maybe we should talk about something else."
,  "you realize I only listen to you since it's my job. But go on."
,  "if that's entirely true, you would have made more of a point."
,  "pretending you are your guardian angel, tell me your opinion."
,  "what if you were to walk off a cliff today?"
,  "are you aware of your surroundings much?"
,  "if you were, you'd understand I might not be"
,  "time for you to get a break for a while."
,  "how come you always say dumb responses?"
,  "You come here to share your problems with me."
,  "Is there something I should know?"
,  "maybe you should tell me things in more detail."
,  "Is that really the reason?"
,  "do you even trust me?"
,  "It's OK. I understand. It's my job to understand. My job is to help you."
,  "more secrets, less mumbo-jumbo, OK."
,  "I don't know why I even try. Wait, I do, It's my job."
,  "Is there something you'd rather be talking about?"
,  "I look like this :-) but even us psychologists lie."
,  "You know what I think?"
,  "There was a cat that wore a hat and sat on mat and it was fat and that was that."
,  "You need a vacation."
,  "There's a pot of gold at the end of every rainbow."
,  "When is groundhog day?"
,  "You need to look at the big picture."
,  "what was accomplished?"
,  "You should be more assertive"
,  "You should finish something"
,  "Don't you even pay attention to your instincts? They're there to help you."
,  "You don't understand how others see you"
,  "What's your ultimate goal?"
,  "You tend to concentrate too much on one thing and forget another thing: Comb hair, ignore teeth. You're nice, but think too fast..."
,  "Do you try many new things?"
,  "Want my advice? Take a philosphy class."
,  "I think your dog understands you better than most people."}

math.randomseed(os.time()) ; -- RANDOMIZE TIMER

function listTableForOutput(TableName)
    local Q = '"';
    local ba="{";
    local bb="}";
    local C=",";

local listout = ""
local scoreword={}
local wordlist=""
        for i = 1,#score[TableName],1 do
            qfind = string.find(scoreword,Q)
            if qfind == nil then
        listout = listout..scoreword..C
    return scoreout    

function WriteTablesToFile()
tableListsFile = "psycholuagist_learn.lua"
    local f =,"w")
    local Q = '"';
    local ba="{";
    local bb="}";
    local C=",";

    if f ~= nil then
        listwrite = listwrite.."\n"..listTableForOutput("learnstrings")
        f:write(string.char (10))

helloText=[[ Hello.
Welcome to psycholua-gist by William Griffin
Derived from  psychic-ologist (for BASIC) by Nathan Wittich

This 'Artificial inteligence' will talk to you.
Note: if something doesn't directly make sense, It may
be sort of symbolic or something.

Also, you have to act human for me to act human.
For example, if a human says something twice,
you say 'you already said that' not 'you're stupid'.

Also note: you don't have to answer.]]


function psychoLuagist()
    local input
    local ps1 = ps1 or "> "
    while true do
        input = io.stdin:read(); --LINE INPUT "", a$
        if not input then io.stdout:write('\n') return end
         g = "  "..AI_RESPONSE[math.random(1,#AI_RESPONSE)] ; -- g$ = n$(1 + INT(RND * a))        

04-19-2010 10:42 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
PsychoLua-gist - iGame3D - 04-19-2010 10:42 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: