Kroah's Game Reverse Engineering Page

 

~ Little Computer People ~

You are here:  
  • Home
    • »  Little Computer People
      • »  LCP Artificial Intelligence

LCP Artificial Intelligence

Let's call LCP the character living in the house.

LCP reacts to 4 kinds of stimulus (given from high to low priority order):

  • House events
  • Primary personnal desires
  • Player queries
  • Secondary personnal desires

As soon as LCP is idle (and in some cases, when interrupted), he chooses an action by checking each kind of stimulus (in the order given above).
When an action meets the criteria, he performs it immediately (skipping all the remaining choices).

The number in brackets is the index of the action (for easy reference).

Check the Actions section for a list of all the game actions.

Check the Main LCP stats and HYBER file format sections for more detail on some LCP stats.

  1. House events

    House events are top priority for LCP. They are triggered by the player or the time:

    ActionTrigger
    Deliver Record [#1C]Control-R
    Deliver Human Food [#1D]Control-F
    Ring Phone [#1E]Control-C
    Deliver Dog Food [#1F]Control-D
    Deliver Book [#20]Control-B
    Ring Phone [#1E]Checked each minute between 08:00 and 20:00
    2% probability

    Up to 10 events can be queued.

    If at least 1 event is in queue, the first event is removed from the queue and the corresponding action is executed by LCP.

  2. Primary personnal desires

    Those actions are essential for LCP (2nd priority).

    • If the alarm clock is ringing, LCP turns off the alarm clock [#29].

    • If LCP needs to pee, he goes to the WC [#15].

    • If LCP is thirsty (>0):
      • If LCP is not ill and 33% probability, he tries to drink a glass of water [#D] (moves to the water tank even if empty).
      • If LCP is ill and the water tank is not empty, he drinks a glass of water [#D].
    • If LCP is hungry (>0):
      • If LCP is not ill and 33% probability, he tries to eat a can of food [#12] (moves to the kitchen even if no can of food remains).
      • If LCP is ill and it remains some can of food, he eats a can of food [#12].
    • If LCP has not lunched and it's lunch time (LCP_lunchHour stat):
      LCP cooks and eats a can of food [#19].

    • If LCP has not dined and it's dinner time (LCP_dinnerHour stat):
      LCP cooks and eats a can of food [#19].

    • If LCP has not woken up and it's wake up time (LCP_wakeUpHour stat):
      LCP turns off the alarm clock, gets up, takes a shower, brushes his teeth, puts clothes, cooks and eats a can of food [#2B].

    • If LCP has not gone to bed and it's sleep time (LCP_sleepHour stat):
      LCP takes a shower, puts on pyjamas, eats a can of food, brushes his teeth and goes to bed [#2C].
  3. Player queries

    Those actions are third priority for LCP.

    See the Player queries main section for details on posting a query.

    • If at least 1 sentence is in queue, according to the priority of the first sentence in queue:
      • Priority between 0 and 3: sentence deleted
      • Priority between 4 and 7: sentence priority increased by 1
      • Priority greater than 7:
        • If the first sentence action is Play with the player [#10] or Play piano [#1A], LCP agrees [#23].
        • The first sentence is removed from the queue and the corresponding action is executed by LCP.

  4. Secondary personnal desires

    Those actions are the last priority for LCP.

    LCP chooses an action according to its personality and the current time.

    • Let compute the number of hours LCP is awoken: current hour - wake up hour (LCP_wakeUpHour).
    • If this value is greater (or equal) than 18 hours or LCP is ill (>= 2):
      LCP goes to bed [#4].
    • Else
      • The time period is determined (begin, middle or end):
        Nb hours awokenDay periodTime periodExample (wake up hour at 06:00)
        0 or 1MorningBegin06:00 to 08:00
        2 or 3MorningMiddle08:00 to 10:00
        4 or 5MorningEnd10:00 to 12:00
        6 or 7AfternoonBegin12:00 to 14:00
        8 or 9AfternoonMiddle14:00 to 16:00
        10 or 11AfternoonEnd16:00 to 18:00
        12 or 13EveningBegin18:00 to 20:00
        14 or 15EveningMiddle20:00 to 22:00
        16 or 17EveningEnd22:00 to 00:00
      • Then, an action list is selected according to the time period and the personality of LCP (LCP_personality):
        PersonalityBeginMiddleEnd
        0ACB
        1ABC
        2CAB
        3CBA
        4BCA
        5BAC
        6ACB
        7BAC
      • If the selected action list is A (activities for a working day):
        • If the current day is Saturday, the selected action list change to B.
        • If the current day is Sunday, the selected action list change to C.
      • Finally, an action is randomly chosen from the selected action list:
        Action list AAction list BAction list C
        Enter the top door [#1B]Talk to the player [#18]Watch TV [#1]
        Close all doors and drawers [#24]Dance [#8]Sit and wait in sofa [#2A]
        Use computer [#2]Leave home [#26]Light the fireplace [#14]
        Write a letter [#7]Switch the TV on/off [#27]Put on music [#5]
        Search top right drawer [#25]Put on music [#5]Enter the top door [#1B]
        Read the newspaper in sofa [#13]Play piano [#1A]Switch the TV on/off [#27]
        Use phone [#1E]Use phone [#1E]Use phone [#1E]
        Feed the pet [#17]Switch the TV on/off [#27]Read the newspaper in sofa [#13]
        Talk to the player [#18]Watch TV [#1]Talk to the player [#18]
        Practice aerobics [#0]Scratch himself [#A]Knock the player screen [#C]
        Use computer [#2]Play with the player [#10]Read the newspaper in sofa [#13]
        Close all doors and drawers [#24]Enter the top door [#1B]Sit and wait in sofa [#2A]
        Read the newspaper in sofa [#13]Practice aerobics [#0]Leave home [#26]
        Leave home [#26]Talk to the player [#18]Spin off the record [#6]
        Use computer [#2]Dance [#8]Watch TV [#1]
        Search top right drawer [#25]Use phone [#1E]Switch the TV on/off [#27]
Visitors visitors since 05/01/2006. Sitemap
Copyright © 2006-2017 by Kroah. Total or partial reproduction forbidden.
All trademarks and copyrights are the property of their respective owners. All rights reserved.
Email Me      Get Firefox Powered by PHPEdit      Valid XHTML 1.1 Valid CSS