ICFP 2004/Finished and Improved 1 Finished Version [Jörg|Joerg] has finished the ant program as described in [Our_Approach|ICFP 2004#Our_Approach]. The version can be downloaded from the side panel {link:finished.tgz|http://www.flexman.homeip.net/space/ICFP+2004/Finished+and+Improved/finished.tgz} See [Screenshots|ICFP 2004/Screenshots#f_s2]. 1 Improved Version [I|Georg] could not resist to improve the finished version. I have added a queen that will guard the food storage and some ants that maintain the hill and kill enemies. The new stategy is described below. You can download the source from the side panel {link:improved.tgz|http://www.flexman.homeip.net/space/ICFP+2004/Finished+and+Improved/improved.tgz} See [Screenshots|ICFP 2004/Screenshots#i_f] 1.1 Global Strategy: There are 4 different kind of ants: - queen - mark paths -> become explorers later - explore & get food - stay-at-home 1.1 Initial phase: In the initial phase it is decided which ant becomes what. - queen election: The ant that sees 3 non-home fields is the queen - mark paths: all ant at the border of the hill - the rest is devided with the ratio 7:1 in explore and stay-at-home ants 1.1 Queen stategy: - go to center of hill - mark center as storage with Marker5 (reuse, since foodtracks are not used inside the hill) - stay ot storage cell and look aound for comming friends with food - clear the cell for very little time and go back. 1.1 mark path stategy: - turn to the outside of the hill - go straight and mark the passed cells with 3 2 1 periodicly - occasionally they go left or right but then the next time they go in the opposite side -> allways go away from the base - rocks and obstacles are avoided and the original direction is memorised - finish if the own cell and the cell ahead is marked and we see a rock - become explorer 1.1 explorer stategy: - go around until find food or food path - if at foodpath: follow it in the right way and decrement the foodpath stength by one - if at food: pickup and look for marked way - follow way to base - during carrying food mark the path with maximal food strength (3) and write the gradient 3 2 1 - if at home: drop at the inside border and explore 1.1 stay-at-home stategy: - go around the inside border of the hill - if see food: take it and follow the border until reach a corner - if at corner turn to center and try to access it and drop food there - during the whole time make sure to stay in the base and look for enemies - if see enemy try to follow him and stick at his ass! Occasionally try to change to relative position to the enemy to give other ants a better chance help surrounding. 1.1 Results: On map 5 the Black colony has a clear disadvantage since the food is much more far away. The food-storage stategy with the queen and the killer ants shows its potential: RED : Rewrite BLACK : Rewrite2 Map : sample5.world Iterations: 10000 Red colony won! Score: 203 : 62 (Red : Black) Killed: 1 : 0 (Red : Black) Iterations: 20000 Red colony won! Score: 236 : 148 (Red : Black) Killed: 2 : 1 (Red : Black) Iterations: 40000 Black colony won! Score: 202 : 269 (Red : Black) Killed: 5 : 1 (Red : Black) Finaly: Iterations: 100000 Black colony won! Score: 0 : 632 (Red : Black) Killed: 50 : 1 (Red : Black) Yeah! 2004-06-10 17:20:30.197 2004-06-10 16:49:58.519 Thu Jun 10 17:19:47 CEST 2004 Thu Jun 10 17:19:50 CEST 2004