• The real voting experience
    105 replies, posted
in the map format, what do the little "1e" things represent? also i don't get why walls are sent every round either but i might just be missing somethin another also: i'm guessing "bot 0" is specifying which bot is receiving commands, but then in the commands themselves, you send in the x/y pos of the bot to be moved? im assuming this is a method of identification, but if you already have bots identified by ids it seems like it'd make sense to just give bots an id and identify them like that
[QUOTE=ThePuska;36270402]Define the field of vision or fog of war more specifically and without floating point math: E.g. the FoV is a circular region around each own agent and own base which reveals enemy agents and energy packages. Calculating whether a tile is within the FoV of a player should be done as follows: The position of the closest base/agent of the player is (ax, ay) The tile position is (tx, ty) FoV radius squared is an integer, r2 The tile is visible if: (ax - tx)^2 + (ay - ty)^2 <= r2[/QUOTE] That's pretty much my implementation exactly, except bases don't contribute to map visibility. [editline]10th June 2012[/editline] [QUOTE=Kopimi;36270416]in the map format, what do the little "1e" things represent?[/QUOTE] That's a base location. The first character is the team number, and the second is the direction the first agent that spawns faces. After that, when an agent moves an energy package into a base, a new agent spawns immediately facing in the same direction as the agent that pushed the package. [QUOTE]also i don't get why walls are sent every round either but i might just be missing somethin[/QUOTE] They [I]should[/I] only be sent when first seen by an agent, but I may have messed up my implementation. [QUOTE]another also: i'm guessing "bot 0" is specifying which bot is receiving commands, but then in the commands themselves, you send in the x/y pos of the bot to be moved? im assuming this is a method of identification, but if you already have bots identified by ids it seems like it'd make sense to just give bots an id and identify them like that[/QUOTE] "Bot" signifies an AI program, and the individual bots (okay, that is pointlessly confusing) are "agents". In the game log, when it says "bot 0" this means all moves from here to a "go" are moves made by agents on team 0. Each agent doesn't have an ID or anything, but is referenced by its position since that should always be unique.
[QUOTE=Ziks;36270569]That's pretty much my implementation exactly, except bases don't contribute to map visibility. [editline]10th June 2012[/editline] The first character is the team number, and the second is the direction the first agent that spawns faces. After that, when an agent moves an energy package into a base, a new agent spawns immediately facing in the same direction as the agent that pushed the package. They [I]should[/I] only be sent when first seen by an agent, but I may have messed up my implementation. "Bot" signifies your AI program, and the individual bots (okay, that is pointlessly confusing) are "agents". In the game log, when it says "bot 0" this means all moves from here to a "go" are moves made by agents on team 0. Each agent doesn't have an ID or anything, but is referenced by its position since that should always be unique.[/QUOTE] oh ok thanks i p much finished parsing the log then, tomorrow i should be able to come up with the rendering and UI for the viewer, so you can step forward and backward and view each individual turn.
[QUOTE=Kopimi;36270695]oh ok thanks i p much finished parsing the log then, tomorrow i should be able to come up with the rendering and UI for the viewer, so you can step forward and backward and view each individual turn.[/QUOTE] I changed "bot" to "team" in the log to make it a bit clearer and more consistent.
Loli, do you have any plans for when we should start the actual competition? When we do judging I guess we run each bot against each other bot on 10 different maps per pair, and score 2 points for a win, 1 for a draw and 0 for a loss. Then the bot with the highest score wins. We could completely automate that and have it stream results to a website as it goes along.
That sounds win. When you're done with coding is when we can start really.
Is (0, 0) at the top left or bottom left?
[img]http://i.imgur.com/lYcYX.png[/img] almost done though honestly i really am not a fan of the log format. it forces me to calculate things that are already known by the server, and using bot's positions as ID's just seems arbitrarily complex and makes parsing it more work :( i need to change the order i load some info, you can already walk through each turn and see what happens, the data is off a bit though because of issues identifying bots [editline]11th June 2012[/editline] also your example log doesn't seem to include any bases?
[QUOTE=Kopimi;36282915][img]http://i.imgur.com/lYcYX.png[/img] almost done though honestly i really am not a fan of the log format. it forces me to calculate things that are already known by the server, and using bot's positions as ID's just seems arbitrarily complex and makes parsing it more work :( i need to change the order i load some info, you can already walk through each turn and see what happens, the data is off a bit though because of issues identifying bots [editline]11th June 2012[/editline] also your example log doesn't seem to include any bases?[/QUOTE] Nice work. I'll give each agent a unique ID to help you. And bases are given in the map (the 1e / 0s etc). [editline]11th June 2012[/editline] Although I won't be able to work on it for a few hours. Expect the ID to be given as the first value.
I'm going to keep agent IDs away from the AI programs themselves though, you'll have to keep track of your agents yourself if you want them to be persistent objects. [editline]11th June 2012[/editline] Is [URL="https://gist.github.com/2901750"]this[/URL] better? Orders now look like this: [code]o [agent ID] [team ID] [order][/code] And agent positions / dead agents look like this: [code]a [agent ID] [team ID] [x pos] [y pos] [direction] d [agent ID] [team ID] [x pos] [y pos] [direction][/code]
[QUOTE=Ziks;36286064]I'm going to keep agent IDs away from the AI programs themselves though, you'll have to keep track of your agents yourself if you want them to be persistent objects. [editline]11th June 2012[/editline] Is [URL="https://gist.github.com/2901750"]this[/URL] better? Orders now look like this: [code]o [agent ID] [team ID] [order][/code] And agent positions / dead agents look like this: [code]a [agent ID] [team ID] [x pos] [y pos] [direction] d [agent ID] [team ID] [x pos] [y pos] [direction][/code][/QUOTE] so basically game logs will include agent IDs, but when an AI program is interacting with the server, they won't be? is it just to make the competition more difficult or what?
[QUOTE=Kopimi;36295226]so basically game logs will include agent IDs, but when an AI program is interacting with the server, they won't be? is it just to make the competition more difficult or what?[/QUOTE] It's pretty trivial to keep track of them yourself, but if everyone wants them I'll let you see IDs for your own agents. Seeing the ID of enemy agents, on the other hand, would let you do things like guess how many enemies there are, bypassing the fog of war. Keeping track of your agents is trivial because they will always follow their order unless that order is to move forwards and there is a wall in the way. So after you decide your turn you can make each agent carry out its order, then when you get sent all your agent's positions by the server, any positions not matching the position of an agent you know of is a newly spawned agent.
Any progress on the visualiser? Feel free to open a pull request to put it in the tools section of the github project.
yeah sorry i'm busy and someone else needs to finish it: [url]http://kopirat.co.cc/files/botwar.zip[/url] all you really need to do is render bases and packets
[QUOTE=Kopimi;36316934]yeah sorry i'm busy and someone else needs to finish it: [url]http://kopirat.co.cc/files/botwar.zip[/url] all you really need to do is render bases and packets[/QUOTE] Thanks, I think I'll try and port your code to javascript before I finish it.
Progress on my visualiser: [url]http://www.ziks.co.uk/aichallenge/[/url] [editline]16th June 2012[/editline] Packages now turn with the agent that's carrying them. With that the server is done, just need to improve the visualiser a bit. We could start the competition now I guess. I'll work on making a thread in a bit.
Sorry, you need to Log In to post a reply to this thread.