Introduction to Computational Creativity Programming project | Department of Computer Science University of Helsinki |
13 Nov 2013, Added information to Notice section. Added information how to access the server into the Notice section
15 Nov 2013, Added information on the packages to the end of the document
28 Nov 2013, Added instructions for reporting
The aim of the project is to implement a creative agent. The agent should create noun phrases, i.e. phrases that have a noun or a pronoun as their head word. Some examples of these phrases could include “The old picture of you” or “A beautiful day”. You are free to decide what you -- or your agent -- thinks are interesting phrases (unusual, funny, or of a particular style?).
The agent should also be able to evaluate the quality of phrases produced by other agents (or by itself). A trivial example for the evaluation function could be to count the number of words in the phrase and prefer values between two and five.
Your task is to implement methods for the generation and evaluation for your agent. Feel free to use your creativity! Lexicon lookup, natural language processing tools, Google n-grams etc. can be used as a part of the system.
The agents produced by students interact with each other by designing and uttering phrases and evaluating phrases produced by other agents. The course organizers provide a platform and templates for implementing the communication between agents. When an agent utters a phrase or evaluates one, it should also give a framing which tells why it thinks the phrase in question is an interesting one.
Finally, the agent should be able to adapt to the feedback it gets from the other agents and change its behaviour accordingly. Here different strategies are possible: for example, to please everybody, to please just certain members of the society (e.g. the ones who tend to have a similar taste), etc. (Feel free to use machine learning/data mining methods here if you have suitable background.)
After all the agents have been implemented they are put together to simulate a creative society.
The final results of the project should contain an implementation of an agent and a written report of the methods implemented. There are going to be two deadlines:
25.11.2013 10:00 - the deadline for fairly complete report and implementation.
29.11.2013 17:00 - the deadline for complete report and implementation. During the weekend we will add your system to the web server. If there are any implementation problems you can still do some fixes during the weekend. In case you would like to get your weekend free, please send your implementation sooner.
The report should be a pdf file covering the following aspects of your project work:
The maximum number of points is 12. The quality and (computational) creativity of the solution counts for 50%, and the insight into the six bullet points above for the other 50% of the points. (Since these instructions are given so late, we will interpret the instructions liberally.)
Notice
During the Autumn School in week 47 the response time for emails will be unpredictable. Please ask your questions either before or after.
Please upload your code to https://code.google.com/intl/et/ or some other public repository.
Below you can find more detailed technical instructions for using the provided platform.
Now there is also a dedicated server running with an IP 128.214.166.76 . This service is running on port 10000. If you want your agent to connect to this server, please change the lines accordingly in your agent.py file:
class Agent:
def __init__(self, name):
"""
Initializes the agent and connects it to the server. The agents are not meant to be
running without connection to the environment server.
"""
self.name = name
self.hostname = "128.214.166.76" # Lines to change
self.port = "10000" # Lines to change
...
PS! The server is only accessible from the computers in the University network (i.e. you cannot connect to the server from your home computer)
The program is implemented in Python 2.7.3. We also already have nltk (http://nltk.org/) package version 2.0.4.
Some additional information can be found from here https://code.google.com/p/agentwordgame/, also check the Wiki section.
We will provide an already implemented server-agent system wordgame. The system is implemented in Python and it expects the cherrypy (v 3.2.4) (http://www.cherrypy.org/) module. Wordgame consists of the following files:
agent.py
This implements the basic functions of the agent, mainly the communication with the server. The agent object implemented in this file is not capable of doing nothing but connecting to the server. The object has interface functions score, adapt and generate. These functions need to be implemented. See next file.
agentVowel.py
This is a sample implementation of an agent. The generate function generates random words and the fraction of either consonants or vowels is depending on the attribute generateVowel . The The score function calculates the score by counting the vowels and consonants in the word. The adapt function modifies the generateVowel attribute according to the feedback it gets from other agents.
attributes.py
This is a file which implements different kind of attributes, which the agents can communicate to each other.
database.py
This is the database of the server.
server.py
This implements the server.
startAgent.py
This is a function which takes a parameter as the agent name and starts one agentVowel. For executing one should give the following command
agentwordgame oskar$ python startAgent.py agent1
The “agent1” can be changed to any string, this is just an identification and makes it possible to start many agents.
Packages
You are encouraged to use different language analysis software. We would give some pointers:
When using packages, please use them in full format:
import nltk
import pattern
import gensim
import whatnot
# Do not use
# from nltk import corpus
# or
# import nltk as myCoolName