AntMe!

from Wikipedia, the free encyclopedia
AntMe!

logo
Basic data

developer AntMe! e. V.
Current  version 1.7.3
(May 2015)
Current preliminary version 2.0
operating system Windows
programming language C #
category Serious game / programming game
German speaking Yes
www.antme.net

AntMe! is a simulation software for Windows written in C # , which is intended to bring programming beginners closer to the topic of artificial intelligence and to offer an easy introduction to the languages ​​C # or Visual Basic . AntMe! belongs to the genre of serious games and it is one of the projects of the initiative “coding4fun” launched by Microsoft ; The project manager and initiator is Uwe Baumann from Microsoft.

In between, the AntMe! -Project founded AntMe Limited, which further developed and operated the project under this name. In mid-2011 the AntMe Limited became the AntMe! e. V. become. This makes AntMe! now fully non-profit. Microsoft is still an official partner of the project.

The simulation is about programming an AI for an ant colony . The ants have to be taught to collect sugar or apples and to fight beetles. A specialization is also possible, whereby some colonies only fight beetles, while others only collect sugar. Several video tutorials make it easier to get started with the program .

A fully functional version has been available since April 2007. In September 2008, version 1.6 was released, in which, among other things, team building was implemented so that you can now also play in XvsX mode. By outsourcing the game configuration, variants such as "Capture The Apple" are also possible and are very popular with developers. The preparatory work for version 2.0 (code name "Chuck" after the Chuck Norris Facts ) is already underway.

requirements

For AntMe! in addition to the AntMe! the .NET Framework version 2.0 and an integrated development environment are required. We recommend Microsoft Visual Studio , which is also available in a free Express version. Visual Studio 2010 is available for Windows XP from Service Pack (SP) 3, Windows Server 2003 from SP 2, Windows Vista from SP 2 and Windows 7 . Instead of Microsoft's Visual Studio z. For example, SharpDevelop can also be used as a development environment. AntMe! recommends programming your ant colony in C #, but you can also use all other languages ​​of the .NET Framework, such as B. Visual Basic or C ++ / CLI , possible.

The registry enables the integration of third-party components into the integrated development environment (IDE).

Download

AntMe! can be downloaded from the official website after registering for free . In addition to AntMe! for C # and Visual Basic also the source code of AntMe! . After downloading the ZIP file, you have to unzip the files and copy them to another directory. You can start programming by opening the "Player.sln" file.

Own class

An ant in the 3D visualization of AntMe!

The "playground" in which you move around and program is already one of AntMe's own ! developed class of C # representing the ant colony . She inherits from the basic ant class.

Event programming

The programming of AntMe! is based on event-driven programming. This means that certain methods are called by the simulation program when a certain event occurs. Specifically at AntMe! it looks like this, for example: If the ant sees a piece of sugar, then the method SehtZucker is called. The statements in this method are then carried out. This could cause the ant to take the lump of sugar and carry it to its burrow.

The ability to set up a class so that its objects respond to events is a privilege of modern programming languages ​​like C #.

Tutorials

For AntMe! there are different tutorials. There are both written and video tutorials on the official website. There are also some helpful instructions in the community forum.

Plugins

Since the new plug-in concept of version 1.6, interested users can write their own plug-ins and add them to the program. Since the source code of AntMe! is publicly accessible, you can also make your own changes there.

For plugins there are the interfaces IPlugin , as well as IConsumerPluginand IProducerPlugin. They can be found in the namespace AntMe.SharedComponents.Plugin .

Code examples

The AntMe! Code is localized. In the German-language variant there are methods such as GeheZuBau or Nimm (zucker) .

The following code snippets are an example of the programming of AntMe! demonstrate:

/// <summary>
/// Wird wiederholt aufgerufen, wenn die Ameise mindestens einen
/// Zuckerhaufen sieht.
/// </summary>
/// <param name="zucker">Der nächstgelegene Zuckerhaufen.</param>
public override void Sieht(Zucker zucker)
{
    if (AktuelleLast == 0 && Ziel == null)
    {
        GeheZuZiel(zucker);
    }
}


/// <summary>
/// Wird einmal aufgerufen, wenn die Ameise einen Zuckerhaufen als Ziel
/// hat und bei diesem ankommt.
/// </summary>
/// <param name="zucker">Der Zuckerhaufen.</param>
public override void ZielErreicht(Zucker zucker)
{
    Nimm(zucker);
    GeheZuBau();
}


/// <summary>
/// Wird wiederholt aufgerufen, wenn die Ameise von einer Wanze angegriffen
/// wird.
/// </summary>
/// <param name="wanze">Die angreifende Wanze.</param>
public override void WirdAngegriffen(Wanze wanze)
{
    LasseNahrungFallen();

    if (Kaste == "Kämpfer")
    {
        if (AnzahlAmeisenDerSelbenKasteInSichtweite >= 3)
        {
            GreifeAn(wanze);
        }
    }
    else
    {
        GeheWegVon(wanze);
    }
}

See also

  • Robocode , a programming game for Java and .NET
  • Core War , a programming game in the assembler-like language "Redcode"

literature

  • Walter Saumweber, Tom Wendel, Wolfgang Gallo, Sebastian Loers: AntMe! - Programming and playing with the ants and Visual C # . Microsoft Press Germany, 2007, ISBN 978-3-86645-205-3 .
  • Hans-Georg Schumann: AntMe! - Learn to program while playing with Visual Basic and the ants . Microsoft Press, 2008, ISBN 978-3-86645-523-8 .
  • Dominik Bösl : Learn to program while playing with C # and AntMe! Galileo Press, 2011, ISBN 978-3-8362-1764-4 (video training).

Web links

Individual evidence

  1. AntMe! Wiki. (No longer available online.) Archived from the original on August 11, 2017 ; accessed on August 10, 2017 . Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / wiki.antme.net
  2. a b c Official AntMe! Website. Retrieved October 21, 2012 .
  3. Uwe Baumann. Retrieved October 21, 2012 .
  4. Official Coding4fun website. Retrieved October 21, 2012 .
  5. Walter Saumweber, Tom Wendel, Wolfgang Gallo, Sebastian Loers: AntMe! - Programming and playing with the ants and Visual C # , Microsoft Press Germany, 2007, pp. 13–22
  6. a b Walter Saumweber, Tom Wendel, Wolfgang Gallo, Sebastian Loers: AntMe! - Programming and playing with the ants and Visual C #. Microsoft Press Germany, 2007, p. 4
  7. Tutorials on the AntMe! Website. Archived from the original on July 18, 2012 ; accessed on August 10, 2017 .
  8. Instructions in the community forum. Retrieved August 10, 2017 .