Ideation Project DA Ruwe
This program provides us with an agent based simulation of an ideation game.
|
Handles what agents are and do, including all the algorithms. More...
Public Member Functions | |
void | play (Period period) |
Makes the agent play a round, ie make its choices. | |
Vector< Idea > | getOwnedIdeas () |
int | getID () |
heuristic | getAgentType () |
Period | getBirthday () |
void | setBirthday (Period birthday) |
Sets the birthday of the agent. | |
Vector< Choice > | getChoices () |
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. |
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.
ideation.Agent.Agent | ( | Period | birthday, |
heuristic | agentType | ||
) | [package] |
This constructor if for the creation of human players.
birthday | the period in which the agent gets created. |
agentType | the type of the agent - which heuristic does it use? |
ideation.Agent.Agent | ( | heuristic | agentType | ) | [package] |
This constructor should not be used from outside.
agentType | the heuristic of the agent. |
ideation.Agent.Agent | ( | Period | birthday | ) | [package] |
This constructor should not be used from outside.
birthday | the period the agent was created in. |
ideation.Agent.Agent | ( | Period | birthday, |
computerPlayer | cpType | ||
) | [package] |
This constructor if for the creation of computer players.
birthday | the period in which the agent gets created. |
agentType | the type of the agent - which heuristic does it use? |
ideation.Agent.Agent | ( | ) | [package] |
This constructor should not be used from outside.
heuristic ideation.Agent.getAgentType | ( | ) |
int ideation.Agent.getAgentTypeInt | ( | ) |
Vector<Choice> ideation.Agent.getChoices | ( | ) |
int ideation.Agent.getID | ( | ) |
Vector<Idea> ideation.Agent.getOwnedIdeas | ( | ) |
double ideation.Agent.getRewardSum | ( | ) |
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.
period | The period in which should be played. |
static heuristic ideation.Agent.randomHumanType | ( | ) | [static] |
static heuristic ideation.Agent.randomType | ( | ) | [static] |
void ideation.Agent.recordIdeas | ( | Period | period | ) |
period | the period from which the results shall be taken. |
void ideation.Agent.recordRewardSum | ( | ) |
period | the 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.
birthday | new birthday |