Not only algorithm, a protocol!
To implement the actual networking, text collection, system/monkey administration you'd clearly need some automation and associated standards.
Fortunately, there's already a draft protocol:
RFC 2795 - The Infinite Monkey Protocol Suite (IMPS)
http://www.faqs.org/rfcs/rfc2795.html
