Ideation Project DA Ruwe
This program provides us with an agent based simulation of an ideation game.
 All Classes Functions Variables
Public Member Functions | Static Public Member Functions | Package Functions
ideation.Agent Class Reference

Handles what agents are and do, including all the algorithms. More...

Inheritance diagram for ideation.Agent:
Inheritance graph
[legend]
Collaboration diagram for ideation.Agent:
Collaboration graph
[legend]

List of all members.

Public Member Functions

void play (Period period)
 Makes the agent play a round, ie make its choices.
Vector< IdeagetOwnedIdeas ()
int getID ()
heuristic getAgentType ()
Period getBirthday ()
void setBirthday (Period birthday)
 Sets the birthday of the agent.
Vector< ChoicegetChoices ()
void recordIdeas (Period period)
 Records the resulting ideas of a period in the agents own arrays and renews bestIdea.
void recordRewardSum ()
 Records the rewards awarded in a period in the agents own arrays and renews rewardSum.
double getRewardSum ()
Idea getBestIdea ()
int getAgentTypeInt ()

Static Public Member Functions

static heuristic randomType ()
 Give out a random heuristic from those available.
static heuristic randomHumanType ()
 Give out a random heuristic from those available for human players.

Package Functions

 Agent (Period birthday, heuristic agentType)
 External agent constructor (human players)
 Agent (heuristic agentType)
 Internal agent constructor.
 Agent (Period birthday)
 Internal agent constructor.
 Agent (Period birthday, computerPlayer cpType)
 External agent constructor (computer players)
 Agent ()
 Internal agent constructor.

Detailed Description

This class provides the agents with a behaviour and specification, as well as with some connections to the outside world. Most notably are the functions Agent#play(Period), Agent#recordIdeas(Period), Agent#recordRewardSum(). Thereby an agent has to be asked to play, afterward the world happens and his choices result in things like new ideas. These results new ideas, etc.. are stored for each agent in the object itself. Therefore after the outside influences have taken place, the results have to be written by the agent. This is what recordIdeas does. This way an agent always knows about all that concerns it and no algorithm has to see data that is stored outside the agent object itself.

Author:
Ruediger Ruwe <ruediger.ruwe @ rwth-aachen.de>
Version:
1.0
Since:
01.06.2012

Constructor & Destructor Documentation

ideation.Agent.Agent ( Period  birthday,
heuristic  agentType 
) [package]

This constructor if for the creation of human players.

Parameters:
birthdaythe period in which the agent gets created.
agentTypethe type of the agent - which heuristic does it use?
ideation.Agent.Agent ( heuristic  agentType) [package]

This constructor should not be used from outside.

Parameters:
agentTypethe heuristic of the agent.
ideation.Agent.Agent ( Period  birthday) [package]

This constructor should not be used from outside.

Parameters:
birthdaythe period the agent was created in.
ideation.Agent.Agent ( Period  birthday,
computerPlayer  cpType 
) [package]

This constructor if for the creation of computer players.

Parameters:
birthdaythe period in which the agent gets created.
agentTypethe type of the agent - which heuristic does it use?
ideation.Agent.Agent ( ) [package]

This constructor should not be used from outside.


Member Function Documentation

Returns:
agentType agentType
Returns:
agentTypeInt agentTypeInt
Returns:
bestIdea bestIdea (owned!?)
Returns:
birthday birthday
Returns:
myChoices myChoices
Returns:
agentID agentID
Returns:
ownedIdeas ownedIdeas
Returns:
rewardSum reward Sum
void ideation.Agent.play ( Period  period)

Invoked after ideation.Agent#recordRewardSum(), ideation.Agent#recordIdeas(Period) before ideation.Environment#happens(Period, Game).

This method lets the agent play on the basis of the information it posesses.

That means, that first any results of previous choices have to be perceived by it. This is done by a call to ideation.Agent#recordIdeas(Period) and/or ideation.Agent#recordRewardSum().

The agent then checks of what type it is and makes its choice accordingly.

At the end of the function it will have created a new choice ideation.Choice and added it to its list of choices made ideation.Agent#myChoices.

Parameters:
periodThe period in which should be played.
static heuristic ideation.Agent.randomHumanType ( ) [static]
Returns:
A random human heuristic from the enum Heuristic.heuristic
static heuristic ideation.Agent.randomType ( ) [static]
Returns:
A random heuristic from the enum Heuristic.heuristic
Parameters:
periodthe period from which the results shall be taken.
Parameters:
periodthe period from which the results shall be taken.
void ideation.Agent.setBirthday ( Period  birthday)

Is only to be used if no other possibilitie arises. For example if the period does not exist before the agents are created. The birthday of an agent should not be changed from the outside in any other case.

Parameters:
birthdaynew birthday

The documentation for this class was generated from the following file:
 All Classes Functions Variables