bugnuts

module
v0.0.0-...-989e160 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 4, 2012 License: GPL-2.0

README

Bugnuts Bot

My code for the AI Challege 2011

A Go learning experience...

This code lives at https://github.com/jcdny/bugnuts

The branch submission contains the code that was actually submitted for the contest including the file submission.zip which is the version uploaded to aichallenge.org.

The master branch is a cleaned up version of that code with more comments and some of the copy/paste idiocy I inflicted on myself removed. Also includes final maps.

Code Roadmap

The executable is built in src/cmd/bot (see main.go for that), the packages are in src/pkg. The botN packages are particular versions of the Bot, bot8.go is the last version which was submitted for the contest, and statbot.go is a logicless bot which supports taking in the true gamestate from the replay engine and stats generated internally to validate my code), movement logic resides mostly in Bot, replay and engine are the packages for implementing replay parsing. Symmetry analysis lives partly in maps and partly in torus. The statepackage handles game state updating, metrics, and statistics; combat does all the combat evaluation and risk calculations; and watcher contains timers and watch point evaluation; and debug manages debug flags.

There is a fancy replay analyzer that lives in src/cmd/analyze that I mostly wrote to learn how to use channels.

Documentation and Writeups

See the wiki for more gory details and pretty graphs.

Copyright © 2011 Jeffrey Davis [email protected], All rights reserved.

The source code is licensed under GPL version 2 or later, see the file LICENSE for details.

Documentation and images here are licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA.

Directories

Path Synopsis
src
pkg/MyBot
MyBot is the original interface definition from the starter package.
MyBot is the original interface definition from the starter package.
pkg/bot0
The v0 Bot -- NOOP Bot; It does nothing, much like the goggles.
The v0 Bot -- NOOP Bot; It does nothing, much like the goggles.
pkg/bot3
The v3 Bot -- Simple diffusion bot.
The v3 Bot -- Simple diffusion bot.
pkg/bot4
The v4 Bot -- First version which used BFS to path to food.
The v4 Bot -- First version which used BFS to path to food.
pkg/bot5
The v5 Bot -- Marginally less Terrible!!!! Leson from v4: if you run out of goals don't have your ants just go to sleep.
The v5 Bot -- Marginally less Terrible!!!! Leson from v4: if you run out of goals don't have your ants just go to sleep.
pkg/bot6
The v6 Bot -- better pathfinding and exploration.
The v6 Bot -- better pathfinding and exploration.
pkg/bot7
The v7 Bot -- Uses montecarlo path in to hill to set defense points but still has no combat.
The v7 Bot -- Uses montecarlo path in to hill to set defense points but still has no combat.
pkg/bot8
The v8 Bot -- Now with combat (no really - not good combat but combat)
The v8 Bot -- Now with combat (no really - not good combat but combat)
pkg/combat
Combat does the combat partitioning, resolution, and montecarlo simulation.
Combat does the combat partitioning, resolution, and montecarlo simulation.
pkg/engine
Engine implements the game engine, taking turn data in and calling out to combat for move resolution.
Engine implements the game engine, taking turn data in and calling out to combat for move resolution.
pkg/game
Game has the game setup parser and various constants and datastructures.
Game has the game setup parser and various constants and datastructures.
pkg/maps
Maps has the map data structures and some of the symmetry code
Maps has the map data structures and some of the symmetry code
pkg/parameters
Parameters holds the per bot parameter files.
Parameters holds the per bot parameter files.
pkg/pathing
Pathing computes distance maps, possibly with seed locations and nearest neighbors.
Pathing computes distance maps, possibly with seed locations and nearest neighbors.
pkg/replay
Replay reads json replay files and produces metadata and game state information.
Replay reads json replay files and produces metadata and game state information.
pkg/statbot
StatBot - Dummy bot that simply outputs the statistics generated out of state.UpdateStatistics().
StatBot - Dummy bot that simply outputs the statistics generated out of state.UpdateStatistics().
pkg/state
State has the turn parser, state updating, metrics, etc.
State has the turn parser, state updating, metrics, etc.
pkg/torus
Package torus implements geometry on a torus.
Package torus implements geometry on a torus.
pkg/util
A few useful math routines and a permutation generator.
A few useful math routines and a permutation generator.
pkg/viz
Viz emits visualization data for a variety of metrics.
Viz emits visualization data for a variety of metrics.
pkg/watcher
Watcher handles watches and gathering timing data.
Watcher handles watches and gathering timing data.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL