synesso / aichallenge Goto Github PK
View Code? Open in Web Editor NEWThis project forked from aichallenge/aichallenge
AI Challenge
Home Page: http://ai-contest.com/
This project forked from aichallenge/aichallenge
AI Challenge
Home Page: http://ai-contest.com/
AntsGame does not propagate game parameters
Ive implemented A* pathfinding before in Java and are thinking to port
to Scala. Hopefully I can do that, or at least start, on Monday
evening.
A* gives high quality pathing at some memory cost
[http://theory.stanford.edu/~amitp/GameProgramming/]. Id be inclined
to try that out and see if the resource demands are a problem. If the
ants are making local moves (to a nearby location), the paths are
short, keeping the CPU & mem costs down.
So maybe think about what a simple pluggable pathfinder interface
might look like, so we can vary the impl easily?
abstract class PathFinder(board: Board) {
def findPath(start: Tile, end: Tile): Seq[Tile]
}
-Ben
So, we discussed this a bit last night, but I wanted to get it down on here.
AI bot parts:
General library functions, such as path-finding, find-nearest-X.
Probably apply to single ants.
Basic strategies for generating orders; eg. explorer, ant-hunter,
food-hunter, random moves.
Should probably apply to groups of ants.
Supervisor -- watches the board and picks groups of ants and
applies strategies to them.
ie. A simple one might be along these lines:
supervisor(game) :Strategy = game.turn_number match {
case 0 to 10 => explorer
_ => game.enemy_ant_count match {
case many => defensive
case few => offensive
}
}
Although I'd rather be using a heuristic than nested match blocks.
I'd then like to be able to adjust the heuristic's parameters via
run-time parameters, so we can try some genetic development.
As discussed, we want to keep things running on the same APIs, so
other supervisors or strategies can be substituted in.
Cheers,
Toby
Oh, but note that the Scala bot issues an invalid order on turn 3 that crashes the game.
It moves an ant, but then tries to move the same ant to the same destination again the next turn, and only on the next turn would it recognise that it's now moved.
ie.
o 63 45 n
go
o 63 45 n
go
o 62 45 n
go
I'm pretty sure this is because for some reason we are emitting 'go' twice at the start, instead of just once.. because we don't recognise the initial setup ("ready") phase.
-Toby
HunterBot needs specs. It may blow up inside a real aichallenge engine.
Put packages in the source. Modify SBT target for ai-submission to flatten out all packages and imports before zipping.
Starter pack current is a full SBT project. But actually they expect you to simply upload flattened sources in a zip. They even instruct the contestant to upload the downloaded zip without modification.
water tiles don't seem to be always updated. cache them when found (they never change)
Ants may attempt to occupy the same target tile at each turn. Need to ensure no two orders have matching destinations.
In the game where I used A_, I cached the
current orders associated with each agent, include paths for move
orders. Each turn, I always evaluated *whether_ the orders need
re-evaluation, but only recomputed the orders & paths themselves if
the current orders were unsatisfactory. This might be because:
So AI & pathfinding isnt necessarily a per-turn computation.
-Ben
As this is the format required by aichallenge submission
As per Ben's email
create an sbt task to run the starter bot ala:
./playgame.py -r 1 -j -o viewer -t 100 --seed 42 -m maps/random4.txt "python bots/python/HunterBot.py" "scala -classpath bots/scala/target/scala_2.8.1/classes/ HunterBot" "scala -classpath bots/scala/target/scala_2.8.1/classes/ HunterBot" "scala -classpath bots/scala/target/scala_2.8.1/classes/ HunterBot"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.