A biofuel powered biological ai given the primary objective of survive, corollary reproduce/replicate. Secondary objectives avoid pain and Chase pleasure (this is an unfortunately deep subsection of this, but tl;dr most of your actions and reactions are the result of achieving a few goals — notably don’t do things that hurt and do things that feel good, given there aren’t crossed wires — in which you are still following the rules it’s just your wires got crossed on what hurts or what feels good — ANYWAYS). Secondary objectives can be suspended in favor of primary directives (one may endure pain to survive or reproduce, one may live just in order to replicate, etc the combinations are irrelevant to the rules).
Emotions being a by product of competing directives, a direct product, or an interpretation. An internalization of mechanical processes. Everything we do or make is a derivative of our own design.