Is Artificial Intelligence restricted to electrical based technology? According to Wikipedia:


  AI is intelligence exhibited by machines.


I have been wondering if with the recent biological advancements, is there already a non-electrical-based "machine" that is programmed by humans in order to be able to behave like a:


  flexible rational agent that perceives its environment and takes actions that maximize its chance of success at some goal


I was specifically thinking of viruses and bacteria. Have these been programmed by humans in order to behave as a flexible rational agent (i.e. an AI entity)?

Are there are other organisms that have already been used for this purpose?
Not yet. Synthetic virology / Synthetic life are still in their infancy.
We can now synthesize simple bacteria (see Craig Venter's fascinating TED talk and also an article about his recent work) but definitely nothing that may be called 'rational' in human standards.