What would it look like if you attempted to sketch out a script for a real cat? Let’s leave out the some of the foundations like the guidelines for building the cat’s body in the first place and maintaining all the various physiological systems, or whether the cat is old or young, or sick or whatever. Just a generic cat on a generic day.
Cat {
Danger [A. Maintain alertness for danger – loop always
A1. If danger is sensed:
*Danger 1 – serious – run helter skelter away FAST far – hide. Watch & Listen. loop till:A2
*Danger 2 – moderate – run away fast moderate distance – hide. Watch & Listen. Loop till:A2
*Danger 3 – mild – skulk into hiding. Watch & Listen. Loop till:A2
A2 – no danger is sensed] Check B

Hunger (if not A) [B. Maintain awareness of hunger – loop always
B1 If hungry: 
*Hunger 1 – starving – be extremely proactive noticing possible food and taking potentially serious risks to get it – loop till scale down option scale down to hunger 2 or hunger 3 or B2
*Hunger 2 – uncomfortable – be proactive noticing possible food and take moderate risks to get it – Scale up to Hunger 1 or down to hunger 3 or down to B2
*Hunger 3 – Meh, I could eat – notice possible food and take easy steps to get it – scale up to hunger 2 or down to B2
B2 not hungry – allow contextual subroutines – C]
Contextual subroutines (if not A, not B) 
C1. Sleep – check need for – loop often
C2. Groom self – check need for – loop often
C3. (if not C, not D)Play – check for anything dangly or twitchy – loop always
C4. Socialize – (if have company: and if company isn’t mean and scary)
                    C4a – [groom friend – if any part of friend is dangly or twitchy – bite or hit dangly twitchy bit of friend – 
                                  C4a1 – tussle with friend – 
                                      C4a2 – inevitable hurt feelings
                                            C4a3 – run short distance away and sulk or pout]
                    C4b – Sleep with warm friend
                         C4b1 – zzzzzzzzzzzzzzzz
                         C4b2 – if awakened by dangly twitchy bits of sleeping friend, bite or hit them
C5. Sit on new things
Loop and vary contextual subroutines till A or B}
There’s my silly little script for a cat. It’s not robust enough or individual enough to really cover the nuances of cat life but if I could write that in ten minutes than a better effort might bring all sorts of other details on-line as well.