GCI

From The Battle for Wesnoth Wiki
Revision as of 18:36, 24 October 2010 by Crab (talk | contribs) (added ai recruitment work)

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

  1. (integer) gold
  2. (integer) maximum number of units to be recruited
  3. table of potential recruits
    1. (string) recruit name
    2. (integer) cost to recruit
    3. (double) how good each unit is
    4. (integer) current quantity
    5. (integer) maximum quantity
    6. (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.

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.