Posts Tagged ‘conversations’

Naked on Pluto goes to São Paulo

Monday, July 4th, 2011

Naked on Pluto has been selected for FILE festival São Paulo 2011 which, in addition to some funding from the Finnish Promotion Centre for Audiovisual Culture (AVEK) allows us to develop the game for an art gallery installation setting.

I’ve been reacquainting myself with bot programming, and trying some experimental and dangerous things with conversations.

As an example, here is a bot that simply repeats things it overhears – if you throw a couple of these in a room and start them going by saying something – chaos follows as they start to repeat you and then each other’s messages:

(define (talkative-action entity graph node)
  (if (and
       (< (random 5) 3) ; do this 3 out of 5 times
       (< (length (pluto-node-old-messages node)) 10)) ; safety valve
      (foldl                ; loop over all the messages
       (lambda (msg node)
         ; get the name of the sender
         (let ((name (entity-name
                      (pluto-node-entity-get
                       node (pluto-message-from msg)))))
           (pluto-say-to-random ; make a new message 
            node                ; to a random entity
            entity
            (string-append ; build the message
             (choose
              (list
               (string-append name " just said: ")
               (string-append "I just heard " name " saying: ")))
             (pluto-message-txt msg))))) ; repeat the message
       node
       (pluto-node-old-messages node))
      node))