GCI
Contents
Google Code In task list
This page is a list of task ideas for the google code-in (see http://code.google.com/gci)
exemple of tasks from previous year
http://code.google.com/p/google-highly-open-participation-gnome/issues/list
Task Template
One paragraph description of task
requirement (expected technical knowledge)
expected time for completion
difficulty
deliverable/expected proof
Graphics
Various Graphics for Wesnoth
requirement (expected technical knowledge) - speak with thespaceinvader?
expected time for completion
difficulty - easy to hard
deliverable/expected proof
AI recruitment algorithm
Description
Wesnoth AI has to select what units to recruit. AI leader stands on keep and can recruit a number of units, up to the number of free hexes in his castle. AI can choose between a number of different unit types. Each unit type costs a certain amount of gold to recruit and the AI knows how good a specific unit is, and should try to recruit better unit types. AI knows how many units of a particular type it has at the moment and the scenario creators want to limit the amount of units of a certain type that the AI can have at the same time. There should be a tunable parameter that will tell the AI to go either for a mass of low-cost low-quality units or few high-cost high-quality units.
Input
- (integer) gold
- (integer) maximum number of units to be recruited
- table of potential recruits
- (string) recruit name
- (integer) cost to recruit
- (double) how good each unit is
- (integer) current quantity
- (integer) maximum quantity
- (double) quality vs quality - 0 means 'go for mass of low-quality units', 1 means 'go for few high-quality units), and other values are in between
Output
a list of units to be recruited.
Example input
- AI has 120 gold
- Up to 5 units are to be recruited
- table of potential recruits
Recruit name | Cost to recruit | How good this unit is | Current Qty | Maximum Qty |
Spearman | 13gp | 12.6 | 1 | 10 |
Royal Guard | 30gp | 40.0 | 0 | 2 |
- go for quality (1)
Example output
Royal Guard, Royal Guard, Spearman, Spearman, Spearman (we go for quality but we can recruit up to 2 royal guards, so the rest of 5 units are spearmans)
Difficulty
Should not be too difficult. But, you need to know either C++ or lua, and you need to think out and code a good algorithm for picking out the units to be recruited.
Deliverable/expected proof
We will provide a incomplete program that provides the correct input and you must complete it, coding a suitable recruitment algorithm.