Difference between revisions of "Google Code-in Micro AI Tasks"

From The Battle for Wesnoth Wiki
(Getting Started)
Line 8: Line 8:
  
 
== Getting Started ==
 
== Getting Started ==
 +
 +
For working on the GCI Lua AI tasks, you need to have a basic familiarity with Wesnoth's markup language WML and with the Lua programming language.  If you do not know WML or Lua yet but are familiar with coding in another language, you can probably acquire the basic skills needed in a few hours.  This project does not require any in-depth knowledge of the complexities of either language.
 +
 +
While not absolutely necessary, it will be helpful to be familiar with the Wesnoth game itself.  You also need to download the Wesnoth AI-Demos add-on, as this contains the AIs that you will be working with.
 +
 +
If you are already familiar with all this, you can skip the rest of this section.
 +
 +
=== Wesnoth ===
 +
 +
Note that '''all the GCI work needs to be done with Wesnoth's development version 1.11'''.  It is not necessary that you compile the latest trunk version, downloading the last release of 1.11 (currently 1.11.0) is sufficient.
 +
 +
If you are not familiar with Wesnoth, start by playing a couple scenarios.  Yes, part of the assignment is playing a computer game!  Some things to try:
 +
 +
* Check out the 'Play' link at the top of this page
 +
* Start one of the four novice level campaigns and play a couple scenarios
 +
* Start a multiplayer game (if this is your first time, you might want to start with a local game against the AI, but there is nothing wrong with playing a networked game against another human and get some advice as you go along)
 +
 +
=== AI-Demos Add-on ===
 +
 +
Download the AI-Demos add-on (click on 'Add-ons' in the main screen) and check out the scenarios, in particular those for which GCI tasks exist.  Note how the AI behavior differs from the normal Wesnoth AI.
 +
 +
=== Wesnoth Markup Language ===
 +
 +
Wesnoth uses an event-driven markup language, WML, to create scenarios and campaigns.  The language manuals can be accessed through the 'Create' link at the top of this page.
 +
 +
You do not require a detailed knowledge of WML for the GCI tasks.  You will, however, need to work with existing WML files, so you should at least understand their structure.  As examples, let's look at some files at the [https://github.com/mattsc/Wesnoth-AI-Demos AI-Demos github repository]add-on (click on the links to see the files):
 +
 +
[https://github.com/mattsc/Wesnoth-AI-Demos/blob/master/_main.cfg _main.cfg]:
 +
 +
This is the main file that sets up the AI-Demos campaign and pulls everything together.  You do not need to understand the details, the important lines for this project are toward the end of the file:
 +
 +
{./scenarios}
 +
 +
This includes all files in directory [https://github.com/mattsc/Wesnoth-AI-Demos/tree/master/scenarios scenarios/].  Not surprisingly, these are the WML files for each of the AI-Demos scenarios.  Check out [https://github.com/mattsc/Wesnoth-AI-Demos/blob/master/scenarios/dragon.cfg dragon.cfg] as a simple example of a basic scenario.
 +
 +
=== Lua ===
 +
 +
The AIs you will be working with are written in [http://www.lua.org/ Lua].  You do not need a detailed knowledge of Lua for the GCI tasks (there are templates available for all parts of the work), but some basic familiarity is required, in particular with the general language structure and with Lua tables.  Check out the [http://www.lua.org/docs.html Lua documentation], in particular the first few sections of the [http://www.lua.org/manual/5.1/manual.html reference manual].
  
 
== Micro AIs Overview ==
 
== Micro AIs Overview ==

Revision as of 15:29, 14 November 2012

Information on the Google Code-in Micro AI Tasks will be added in the next couple days.

Getting Help

This page provides information on the Google Code-in Wesnoth Lua AI tasks. If you need additional help, the preferred way of contacting us is on the Wesnoth IRC channels, specifically #wesnoth-dev. Ask for mattsc or Alarantalara. If we're not online, ask your questions anyway. Somebody else might be able to help. We will also read the logs and get back to you as soon as possible.

Another way of contacting us is via the Wesnoth forums, either by posting a question there (go to the 'Coders Corner' forum, we will have a GCI thread there) or by sending us a personal message (PM).

Getting Started

For working on the GCI Lua AI tasks, you need to have a basic familiarity with Wesnoth's markup language WML and with the Lua programming language. If you do not know WML or Lua yet but are familiar with coding in another language, you can probably acquire the basic skills needed in a few hours. This project does not require any in-depth knowledge of the complexities of either language.

While not absolutely necessary, it will be helpful to be familiar with the Wesnoth game itself. You also need to download the Wesnoth AI-Demos add-on, as this contains the AIs that you will be working with.

If you are already familiar with all this, you can skip the rest of this section.

Wesnoth

Note that all the GCI work needs to be done with Wesnoth's development version 1.11. It is not necessary that you compile the latest trunk version, downloading the last release of 1.11 (currently 1.11.0) is sufficient.

If you are not familiar with Wesnoth, start by playing a couple scenarios. Yes, part of the assignment is playing a computer game! Some things to try:

  • Check out the 'Play' link at the top of this page
  • Start one of the four novice level campaigns and play a couple scenarios
  • Start a multiplayer game (if this is your first time, you might want to start with a local game against the AI, but there is nothing wrong with playing a networked game against another human and get some advice as you go along)

AI-Demos Add-on

Download the AI-Demos add-on (click on 'Add-ons' in the main screen) and check out the scenarios, in particular those for which GCI tasks exist. Note how the AI behavior differs from the normal Wesnoth AI.

Wesnoth Markup Language

Wesnoth uses an event-driven markup language, WML, to create scenarios and campaigns. The language manuals can be accessed through the 'Create' link at the top of this page.

You do not require a detailed knowledge of WML for the GCI tasks. You will, however, need to work with existing WML files, so you should at least understand their structure. As examples, let's look at some files at the AI-Demos github repositoryadd-on (click on the links to see the files):

_main.cfg:

This is the main file that sets up the AI-Demos campaign and pulls everything together. You do not need to understand the details, the important lines for this project are toward the end of the file:

{./scenarios}

This includes all files in directory scenarios/. Not surprisingly, these are the WML files for each of the AI-Demos scenarios. Check out dragon.cfg as a simple example of a basic scenario.

Lua

The AIs you will be working with are written in Lua. You do not need a detailed knowledge of Lua for the GCI tasks (there are templates available for all parts of the work), but some basic familiarity is required, in particular with the general language structure and with Lua tables. Check out the Lua documentation, in particular the first few sections of the reference manual.

Micro AIs Overview

Converting an AI to a Micro AI

Parametrizing a Micro AI