2011-11-22T00:00:09 thestinger: make a bayesian model and eliminate those hypotheses (about the number of opponents) that are inconsistent with the data! 2011-11-22T00:00:12 bmh: gotta read the engine for that 2011-11-22T00:00:23 bmh: re bayes I started working on that 2011-11-22T00:00:54 BenJackson: jawesome! 2011-11-22T00:01:35 `username` varchar(128) NOT NULL, 2011-11-22T00:01:41 that's from the DB schema 2011-11-22T00:01:45 the starting positions and varied bot skills makes testing stuff pretty hard 2011-11-22T00:01:47 *** delt0r_ has joined #aichallenge 2011-11-22T00:01:57 sometimes I have a branch that improves something, but it takes 3-4 days of running it to be sure 2011-11-22T00:02:04 yeah 2011-11-22T00:02:24 and I don't really trust the ranking on the tcp server 2011-11-22T00:02:38 oh hell no 2011-11-22T00:02:41 because good bots start off with new names and bring my bot way down in ranking if I lose, etc. 2011-11-22T00:02:50 have to watch so many damn replays 2011-11-22T00:03:02 I think my bots are ranked lower on all the tcp servers than on the actual challenge site 2011-11-22T00:03:18 well, look at the top 30 bots 2011-11-22T00:03:25 it's like 8 people with different versions 2011-11-22T00:03:52 maybe more than 8 :P 2011-11-22T00:04:08 I have suspicions that a lot of the bots are the same people even tho the names are different 2011-11-22T00:04:22 just to get in the spirit I'll start a second bot on fluxid 2011-11-22T00:04:34 thestinger: don't worry about starting positions when inferring the number of bots. Just think about the size of the map and how many bots you could actually fit 2011-11-22T00:04:56 there are some crazy maps though :\ 2011-11-22T00:05:04 I should submit my terrible diffusion bot to the game proper 2011-11-22T00:05:14 http://ants.fluxid.pl/replay.9972 2011-11-22T00:05:16 this is ridiculous 2011-11-22T00:05:50 That's a bad map. (see a1k0n's rant) 2011-11-22T00:05:53 no kidding! 2011-11-22T00:05:58 fkn hate that map 2011-11-22T00:06:01 I like how that's a "maze" 2011-11-22T00:06:12 I'm amazed at how many fluxid replays I can see without me appearing in them 2011-11-22T00:06:20 *** scribble has joined #aichallenge 2011-11-22T00:06:55 the game specification actually says something about minimum distances hills need to be from each other 2011-11-22T00:06:59 I'd like to see a map with long mazy bits and a central 'rumble' chamber. Oh, and make the mazy bits small enough that you can zap eachother through them 2011-11-22T00:06:59 this map, OTOH, is kinda cool: http://ants.fluxid.pl/replay.9974 even though there's a ridiculously close start 2011-11-22T00:07:24 *** TheLinker has quit IRC (Quit: Bye) 2011-11-22T00:07:33 http://ants.fluxid.pl/map/mmaze_02p_01.map I actually like this map the most 2011-11-22T00:07:53 my bot is *terrible* at that map 2011-11-22T00:07:53 they should do all the starter ants on that map 2011-11-22T00:07:56 I'd like to see a map with four hills, separated by water, where you can see all the hills from the start 2011-11-22T00:08:12 the funny thing is that I'm great at mazes and suck at random_walks 2011-11-22T00:08:16 it's definitely a "turtle" map 2011-11-22T00:08:16 or open spaces in general 2011-11-22T00:08:38 yeah, my bot is terrible at dealing with open spaces 2011-11-22T00:08:43 because my foragers sacrifice themselves 2011-11-22T00:09:06 and I lacked defense before about an hour ago 2011-11-22T00:09:32 * bmh lacks a working bot, cause he talks on IRC too much 2011-11-22T00:10:16 *** twymer has quit IRC (Ping timeout: 240 seconds) 2011-11-22T00:11:39 so now I need to figure out how to estimate the number of players 2011-11-22T00:11:48 and ofc that changes as people are killed 2011-11-22T00:11:49 my newer bot seems to be in a long slow loss on fluxid 2011-11-22T00:11:56 it has only had a dozen bots for hundreds of turns now 2011-11-22T00:14:23 aaand the game is not showing up? 2011-11-22T00:16:59 btw, pypy support is now fully live on the contest servers 2011-11-22T00:19:36 *** Areks has joined #aichallenge 2011-11-22T00:19:52 *** bhasker has joined #aichallenge 2011-11-22T00:20:17 @later tell McLeopold not to just take care of that corner case at this point, no 2011-11-22T00:20:17 janzert: Aye, aye, sir 2011-11-22T00:20:54 very attentive bot you've got there 2011-11-22T00:21:20 yeah but he can be rather impolite too ;) 2011-11-22T00:21:22 @error 2011-11-22T00:21:23 janzert: You have no gotten any error messages recently, so here's a random one just to let you know that we care. 2011-11-22T00:21:32 heh 2011-11-22T00:21:35 @fight janzert contestbot 2011-11-22T00:21:36 thestinger: janzert: 414, contestbot: 379 2011-11-22T00:22:25 *** Jak_o_Shadows has joined #aichallenge 2011-11-22T00:24:17 http://ants.fluxid.pl/replay.10008 2011-11-22T00:24:26 that game is a perfect example of how I suck on big open maps 2011-11-22T00:24:48 if you just select my fog of war and then drag along you can see I collapse down to nothing near the end 2011-11-22T00:25:39 *** Jak_o_Shadows1 has quit IRC (Ping timeout: 276 seconds) 2011-11-22T00:26:06 *** treeform has quit IRC (Remote host closed the connection) 2011-11-22T00:28:13 there's another bug squashed 2011-11-22T00:29:43 *** rajanaresh has joined #aichallenge 2011-11-22T00:32:07 *** GeorgeSebastian has quit IRC (Quit: popped out) 2011-11-22T00:38:05 i dunno if i like the lone survivor bonus 2011-11-22T00:38:19 only because it's so random on when a game will or wont be allowed to last that long 2011-11-22T00:38:23 so if we collect more than 1 food its all stored in the hill is it? 2011-11-22T00:38:29 and an ant is spawned every turn? 2011-11-22T00:38:33 bhasker: yep, that's your hive 2011-11-22T00:38:39 although you may have more than one hill 2011-11-22T00:38:49 can more than one ant spawn on a hill in a single turn? 2011-11-22T00:38:50 and there's a possible random tie break on which hill may spawn an ant 2011-11-22T00:38:55 makes life complicated 2011-11-22T00:39:03 only a single ant can spawn on each hill per turn 2011-11-22T00:39:13 BenJackson: well to be fair they ganged up on you 2011-11-22T00:39:23 an ant will spawn at the hill that spawned an ant longest ago that can spawn an ant, if there's a tie it breaks it randomly 2011-11-22T00:39:25 hard to expand with that kind of pressure 2011-11-22T00:39:30 ah k 2011-11-22T00:39:50 i don't like that, i wish bots had to execute spawn orders and were just told how many ants are in their hive 2011-11-22T00:40:12 *** peyton has quit IRC (Quit: peyton) 2011-11-22T00:41:28 that would be cool 2011-11-22T00:42:09 especially for those trecherous maps with 500 hills 2011-11-22T00:42:45 of course that would give you free information on whether your hive was smashed while it wasn't observed but... oh well 2011-11-22T00:43:23 *** amstan has quit IRC (Remote host closed the connection) 2011-11-22T00:44:06 *** ltriant has quit IRC (Quit: Computer has gone to sleep) 2011-11-22T00:49:04 a new strcat is born \o/ 2011-11-22T00:49:05 don't let ants spawn at a hill out of view? 2011-11-22T00:50:04 so there is no incentive anymore to kill enemy ants unless they are blocking your access to food or hill? 2011-11-22T00:50:07 or attacking your hill 2011-11-22T00:55:23 bhasker: control over territory for new food etc. 2011-11-22T00:55:36 and you need to get through ants to get to enemy hills etc. 2011-11-22T00:55:40 the ants still need to interact 2011-11-22T00:55:45 hmm k 2011-11-22T00:56:12 *** ThatSnail has quit IRC (Ping timeout: 276 seconds) 2011-11-22T01:13:30 *** epicmonkey has joined #aichallenge 2011-11-22T01:14:13 *** peyton has joined #aichallenge 2011-11-22T01:18:40 *** epicmonkey has quit IRC (Ping timeout: 240 seconds) 2011-11-22T01:22:46 *** Jak_o_Shadows1 has joined #aichallenge 2011-11-22T01:24:55 *** nappatak has joined #aichallenge 2011-11-22T01:25:26 *** Jak_o_Shadows has quit IRC (Ping timeout: 244 seconds) 2011-11-22T01:26:24 *** ikaros has joined #aichallenge 2011-11-22T01:27:17 *** nappatak has quit IRC (Client Quit) 2011-11-22T01:27:53 so antimatroid what are you using to explore the map and guide the ants? 2011-11-22T01:31:30 bhasker: for food/enemy/hill collection a* with multi sources and multi targets 2011-11-22T01:31:49 and when nothing is available? 2011-11-22T01:31:52 for unseen/not recently seen squares just bfs with multi source 2011-11-22T01:32:03 what do you mean nothing available? 2011-11-22T01:32:09 hmm k 2011-11-22T01:32:10 i'll "reuse moved ants" when collecting food too 2011-11-22T01:32:29 i meant when no food/enemy or hill is around your ants 2011-11-22T01:32:30 i've got some battle code going too 2011-11-22T01:32:46 hmm k 2011-11-22T01:33:23 just do all the other stuff 2011-11-22T01:34:07 battle code is what's most interesting to me at the moment though 2011-11-22T01:34:09 hmm k 2011-11-22T01:34:17 have you played with that yet? 2011-11-22T01:34:17 my battle code needs work:-\ 2011-11-22T01:34:23 what are you doing? 2011-11-22T01:34:39 well mostly i build adhoc squads then step them one step toward target 2011-11-22T01:34:44 do the same for the targets 2011-11-22T01:34:50 then for each new location of the ants in the squad 2011-11-22T01:34:54 i do a battle resolution 2011-11-22T01:35:08 each local battle results in 1/0/-1 2011-11-22T01:35:09 i'm partitioning ants up into those that could land in battles, then for enemies and friend ants picking a set of "offensive" and a set of "defensive" moves then basically run minimax on that 2011-11-22T01:35:16 cause it's a 2x2 game it's quite fast 2011-11-22T01:35:25 yea i am not doing a full minimax yet 2011-11-22T01:35:28 need to do that 2011-11-22T01:35:33 this isn't a full minimax 2011-11-22T01:35:35 its just like 1-2 step 2011-11-22T01:35:38 i did that and it was fairly slow 2011-11-22T01:35:45 even for smaller partitions 2011-11-22T01:35:48 i just do 1 step of mine and enemy 2011-11-22T01:35:50 for each ant 2011-11-22T01:35:52 and sum the battle results 2011-11-22T01:36:02 the problem is i am not generating all possible paths 2011-11-22T01:36:07 from my ant totarget 2011-11-22T01:36:14 so i might get a good result along one path 2011-11-22T01:36:19 but along another path i might lose 2011-11-22T01:36:33 so if the enemy picks the other one my bot loses the battle sometimes 2011-11-22T01:36:39 have to fix that 2011-11-22T01:36:57 but first trying to get it to explore properly right now my exploration code is broken as hell 2011-11-22T01:40:39 bhasker; what are you doing for exploration? 2011-11-22T01:41:06 *** cyphase has quit IRC (Quit: http://www.cyphase.com/) 2011-11-22T01:41:36 i tried a few strategies, now i am trying the pledge algorithm 2011-11-22T01:41:50 basically i pick a random direction and move in that till i hit a wall then i do wall follow 2011-11-22T01:42:05 so each ant independently does a walk 2011-11-22T01:42:27 my older strategy was to move only when it increased vision 2011-11-22T01:42:32 which worked well in the previous ruleset 2011-11-22T01:42:38 but in this it just ends up blocking the hill 2011-11-22T01:42:42 and prevents ants from spawning 2011-11-22T01:44:19 bhasker: How about a levy flight? 2011-11-22T01:44:34 not sure what that is bmh :( 2011-11-22T01:44:36 *** Euphony has joined #aichallenge 2011-11-22T01:44:42 walking till you *hit* a wall is a dumb strategy. Walking until you *know* you'll hit a wall is smarter. 2011-11-22T01:44:54 hmm true 2011-11-22T01:45:01 bhasker: wikipedia, man! bhasker: en.wikipedia.org/wiki/Lévy_flight 2011-11-22T01:45:06 yea just looking it up 2011-11-22T01:45:19 it's probably a bad idea because we know how large the map is 2011-11-22T01:46:03 let me make that change makes sense no point going edge to edge 2011-11-22T01:46:06 I once wrote a tiny tank AI that used a levy flight. Toward the end of the game bots couldn't find other bots to shoot, while my bot tended to find them and mop up. (other than that it was a rubbish bot and I stole my shooting controls from another bot) 2011-11-22T01:46:50 levy flight seems a bit too complicated to implement at the moment 2011-11-22T01:47:06 but implementing a move when i know a wall will be hit should be easier 2011-11-22T01:47:14 and more useful! 2011-11-22T01:47:22 yes 2011-11-22T01:47:33 Levy Flight is really simple. The only magic is the distribution you're sampling from to get the segment lengths. 2011-11-22T01:48:28 yea will look into that next, let me see how much of an improvement i can get with simple fixes first 2011-11-22T01:48:42 i anyway think i might have to rewrite this bot, since i had written it for the previous ruleset 2011-11-22T01:48:48 That's smart :) 2011-11-22T01:48:48 and it has too many baked in assumptions 2011-11-22T01:49:20 though i really need to get out of this if then else habit of coding bots 2011-11-22T01:49:24 My bot doesn't even work! 2011-11-22T01:49:35 and i need to add some defense code 2011-11-22T01:49:47 though i wonder why hills have no visibility 2011-11-22T01:49:59 you know one would think a hill should have at least the same visibility as an ant 2011-11-22T01:50:01 at least 2011-11-22T01:50:07 *** ikaros has quit IRC (Quit: Ex-Chat) 2011-11-22T01:50:12 right now if your ant is away from hill you don't get vision information around your hill 2011-11-22T01:50:23 which makes for a messy situation:-\ 2011-11-22T01:50:37 *** Fandekasp has joined #aichallenge 2011-11-22T01:52:05 *** ALplus has joined #aichallenge 2011-11-22T01:54:58 *** bmh has quit IRC (Quit: Page closed) 2011-11-22T01:55:23 bhasker: yeah i just started a bot pretty much from scratch the other day 2011-11-22T01:55:42 i basically stripped my beta bot down to having no strategy and built up from there 2011-11-22T01:55:50 yea will have to do something like that 2011-11-22T01:56:01 most of my state stuff is things i can reuse 2011-11-22T01:56:06 and battle code can be reused too 2011-11-22T01:56:19 i didn't have battle code before 2011-11-22T01:56:23 did that over the weekend 2011-11-22T01:56:25 since i didn't take into account the food in battle in my older code 2011-11-22T01:56:32 so that doesn't change 2011-11-22T01:56:44 its mostly the exploration code which needs a better strategy 2011-11-22T01:56:59 and need to add defense code for hills and attack code for enemy hills 2011-11-22T01:57:06 also need to add some path caching 2011-11-22T01:57:11 into my a* 2011-11-22T01:57:19 so that i can reuse partial path generations 2011-11-22T01:57:27 and not rebuild complete paths everytime 2011-11-22T01:57:56 i was going to store moves between turns but the random tie break rule for hills ruined that plan 2011-11-22T01:57:58 it was just too messy 2011-11-22T01:58:01 esp like when routing alls pare ants to some enemyHill 2011-11-22T01:58:16 instead of generating all paths over and over again 2011-11-22T01:58:23 a lot of ants will have a common path after a point 2011-11-22T01:58:33 so closer ants paths can be reused 2011-11-22T01:58:39 for longer paths 2011-11-22T01:58:50 instead of recalculating all of it 2011-11-22T01:59:00 but my code is not structured that way right now to make use of cached paths 2011-11-22T01:59:04 will have to rewrite a lot of it 2011-11-22T02:07:48 *** b0rder has quit IRC (Ping timeout: 258 seconds) 2011-11-22T02:08:07 *** b0rder has joined #aichallenge 2011-11-22T02:09:20 *** Palmik has joined #aichallenge 2011-11-22T02:12:03 *** Jak_o_Shadows1 has quit IRC (Remote host closed the connection) 2011-11-22T02:16:55 *** treeform has joined #aichallenge 2011-11-22T02:18:55 antimatroid: can you explain your multi A*? 2011-11-22T02:32:02 *** AntDroid has joined #aichallenge 2011-11-22T02:36:50 McLeopold: hdist(x) = min manhatten distance from x to a target location 2011-11-22T02:36:52 McLeopold: anything else? 2011-11-22T02:38:04 multi source is easy, just add all ants to the search queue when you start searching 2011-11-22T02:38:26 ? 2011-11-22T02:38:37 *** cyphase has joined #aichallenge 2011-11-22T02:38:54 hdist is your heuristic function for a location x, it gives the best case min path length to a target location 2011-11-22T02:39:16 so, multiple sources and multiple targets? 2011-11-22T02:39:20 yep 2011-11-22T02:39:57 say i'm collecting food, i'll add all movable ants to a search queue, with g = turn the ant is available to move (=0 unless the ant has already been "moved") 2011-11-22T02:39:59 at once? 2011-11-22T02:40:09 yeah all simultaneously 2011-11-22T02:40:17 then f = g + h 2011-11-22T02:40:25 and the priority queue orders by f 2011-11-22T02:40:31 and i think i break the tie with h 2011-11-22T02:40:39 okay, I get a* with 1 source and 1 dest 2011-11-22T02:40:55 okay, a* with n sources is almost the same 2011-11-22T02:41:03 just add all source locations to your search queue at the start 2011-11-22T02:41:04 with me? 2011-11-22T02:41:11 no... 2011-11-22T02:41:30 I understand what you are saying to do, I don't get how it works... 2011-11-22T02:41:42 http://en.wikipedia.org/wiki/A*_search_algorithm#Description 2011-11-22T02:41:50 i think based on that definition 2011-11-22T02:42:05 for 1 target you have h(x) = manhatten distance (x, target) 2011-11-22T02:42:13 i just make h(x) the minimum of those distances 2011-11-22T02:42:29 so, do you just get 1 source to dest output? 2011-11-22T02:42:43 yeah 2011-11-22T02:42:47 ah 2011-11-22T02:42:54 you find a minimum path from one of the sources to one of the targets 2011-11-22T02:43:12 then when i collect food i'll iteratively collect uncollected food 2011-11-22T02:43:32 and start over for each food? 2011-11-22T02:44:08 you can also get information about how many turns untill say a square could be in the battle range of an enemy and use such information while pathfinding with your g(x) values 2011-11-22T02:44:17 yeah i start the search again for each food item 2011-11-22T02:44:31 it seems that any open node that was headed to a food node that got picked by a different source would need to be thrown out 2011-11-22T02:44:43 what? 2011-11-22T02:44:55 okay, I need an example... 2011-11-22T02:45:53 i think it's also worth sometimes treating your other ants like water when pathfinding 2011-11-22T02:46:09 that should do a poor job of diverting ants around battles to come in from other directions 2011-11-22T02:46:13 maybe, but I'm solving a problem for map generations :) 2011-11-22T02:46:26 ahhh, just use bfs? 2011-11-22T02:46:34 maybe, but I wanted to check 2011-11-22T02:46:41 i'm not really sure that this a* is any faster than bfs 2011-11-22T02:46:46 but it's cooler so i'm using it anyway :P 2011-11-22T02:46:58 http://paste.aichallenge.org/KtWMl/ 2011-11-22T02:47:12 the problem comes in with calculating the heuristic distance, if you have lots of targets then it might be quite slow i think 2011-11-22T02:47:36 McLeopold: wayyyyyyyyyyyyyyy too many hills 2011-11-22T02:47:38 so, in that map, every ant/hill is a potential candidate for an actual hill, I want a matrix of distances 2011-11-22T02:47:41 awesome otherwise 2011-11-22T02:47:47 ahhh okay 2011-11-22T02:48:14 I can bfs from each hill until I cover the map. 2011-11-22T02:48:23 I was wondering if there was a better way 2011-11-22T02:48:26 yeah 2011-11-22T02:48:29 i'll think about it 2011-11-22T02:48:36 i would probably just do the bfs from each hill 2011-11-22T02:48:41 that should still be quite fast 2011-11-22T02:49:14 McLeopold: the matrix is going to be symmetric 2011-11-22T02:49:19 I was thinking of writing a python coroutine to do it :) 2011-11-22T02:49:19 you should be able to use that information? 2011-11-22T02:49:42 yeah, so for each hill, I can remove it from the list for the next cycle 2011-11-22T02:50:12 and you don't need to do the last cycle? 2011-11-22T02:50:16 I guess the best case would be to use the furthest hill from the last cycle as the seed for the next 2011-11-22T02:50:39 then you end up with the later cycles being near each other 2011-11-22T02:50:41 have you written it up and seen how fast it is? 2011-11-22T02:50:45 no 2011-11-22T02:50:47 i can't imagine it's going to be much of a problem 2011-11-22T02:51:19 what's the plan for picking hill locations? 2011-11-22T02:51:20 but...coroutines :D 2011-11-22T02:51:42 remove combos out of proper range 2011-11-22T02:51:51 *** thestinger has quit IRC (Quit: WeeChat 0.3.6) 2011-11-22T02:51:54 maximising the average path to other squares or something might put them further away from the central battle zones in mazes? 2011-11-22T02:52:25 although variety there might be good 2011-11-22T02:52:31 I need to enforce the 250 max hill-to-hill requirement 2011-11-22T02:52:41 and the 100 min 2011-11-22T02:52:55 and also proving if 250 and 100 make sense 2011-11-22T02:53:03 yep 2011-11-22T02:53:07 100 is quite large? 2011-11-22T02:53:16 yeah, that would probably need to be smaller 2011-11-22T02:53:22 wont that almost make open maps unfeasible with similar dimensions? 2011-11-22T02:53:44 not if they have enough barriers between the hills 2011-11-22T02:54:06 shouldn't there be some maps that are almost entirely open? 2011-11-22T02:54:12 yep 2011-11-22T02:54:24 while i love the maze maps i agree on the need for variety 2011-11-22T02:54:27 but we still want some type of min 2011-11-22T02:54:41 i would put it somewhere like 30 2011-11-22T02:54:45 and consider even reducing that 2011-11-22T02:54:48 that sounds good 2011-11-22T02:55:00 a1k0n probably has an opinion on that one :P 2011-11-22T02:55:23 I think we had talked about view radius * 2 or 3 2011-11-22T02:56:19 it's now 7ish yeah? 2011-11-22T02:56:29 sqrt(77) 2011-11-22T02:56:45 8ish 2011-11-22T02:56:49 yep 2011-11-22T02:57:04 so, 24 makes sense to me 2011-11-22T02:57:19 sure 2011-11-22T02:57:25 the max distance needs to be coordinated with the cutoff rules 2011-11-22T02:57:46 are you going to allow them to start in view of each other? 2011-11-22T02:57:55 ie. the path between two in view could be greater than 24 2011-11-22T02:58:17 yes, just the path, not actual distance 2011-11-22T02:58:42 i think it might be nice to also say we'll ensure you can't see enemies hills and vice versa on the first turn? 2011-11-22T02:58:53 but that's not true 2011-11-22T02:59:02 but we could 2011-11-22T02:59:10 just enfore a min starting euclidean distance 2011-11-22T02:59:16 up until now that's probably already been the case 2011-11-22T02:59:28 yeah, probably 2011-11-22T02:59:44 i don't mind too much either way, but we should clarify whichever way we do go 2011-11-22T02:59:50 because we haven't said anything about that 2011-11-22T03:00:22 we didn't, I can add that to the map specs 2011-11-22T03:00:46 can you easily add these checks to your multi-maze code? 2011-11-22T03:00:59 which checks? 2011-11-22T03:01:04 min/max hill dist 2011-11-22T03:01:18 atm it has a min euclidean starting distance greater than view (pretty sure it's greater) 2011-11-22T03:01:25 but it doesn't do anything about path lengths 2011-11-22T03:01:49 after you generate a new hill location, you could do the bfs to ensure it is within range 2011-11-22T03:01:54 hey guys, how are people exploring. I mean how do you explore the map. I just need some buzz words i can look into. 2011-11-22T03:02:10 rajanaresh: path finding 2011-11-22T03:02:20 unseen squares and map coverage 2011-11-22T03:02:26 you mean like A* 2011-11-22T03:02:35 breadth first search is easiest 2011-11-22T03:02:36 I think the diffusion guys do good exploring as well 2011-11-22T03:02:37 but i use a* 2011-11-22T03:02:50 well not for exploration i don't, target set is too large 2011-11-22T03:03:59 I already do A* for food collection. But this is very specific. I have the target. Suppose I have a free ant. How do I let him explore? 2011-11-22T03:03:59 McLeopold: i think amstan has also been playing around with map stuff 2011-11-22T03:04:18 he has, he's got some nice cell automation stuff 2011-11-22T03:04:24 rajanaresh: bfs until you find something attractive like an enemy/not seen square etc. 2011-11-22T03:06:02 i'm most interested in what people are doing for battle code 2011-11-22T03:06:05 *** thestinger has joined #aichallenge 2011-11-22T03:16:02 *** janzert1 has joined #aichallenge 2011-11-22T03:17:09 *** aerique has joined #aichallenge 2011-11-22T03:18:32 *** janzert has quit IRC (Ping timeout: 252 seconds) 2011-11-22T03:19:20 *** speakeasy has joined #aichallenge 2011-11-22T03:32:33 *** kiv has quit IRC (Quit: Leaving) 2011-11-22T03:34:55 *** HaraKiri has joined #aichallenge 2011-11-22T03:39:24 *** mj41 has joined #aichallenge 2011-11-22T03:43:09 *** sigh has joined #aichallenge 2011-11-22T03:43:54 *** ALplus has quit IRC (Ping timeout: 276 seconds) 2011-11-22T03:58:47 *** waroy has joined #aichallenge 2011-11-22T04:00:40 *** speakeasy2 has joined #aichallenge 2011-11-22T04:02:20 *** g0llum has joined #aichallenge 2011-11-22T04:14:35 hi guys 2011-11-22T04:15:12 can you help me to understand how to code a depth first or breadth first search into python 2011-11-22T04:15:16 ? 2011-11-22T04:21:28 *** speakeasy2 has quit IRC (Ping timeout: 240 seconds) 2011-11-22T04:23:29 *** ikaros has joined #aichallenge 2011-11-22T04:24:14 *** Limited10 has joined #aichallenge 2011-11-22T04:24:52 *** Surya has joined #aichallenge 2011-11-22T04:25:44 Hi 2011-11-22T04:25:45 Sir 2011-11-22T04:25:50 excuse me 2011-11-22T04:26:03 *** grwip has joined #aichallenge 2011-11-22T04:27:27 the floor is yours, Limited10 2011-11-22T04:30:10 *** speakeasy2 has joined #aichallenge 2011-11-22T04:32:13 *** avdg1 has joined #aichallenge 2011-11-22T04:33:06 *** Limited10 has quit IRC (Ping timeout: 265 seconds) 2011-11-22T04:35:28 *** avdg has quit IRC (Ping timeout: 240 seconds) 2011-11-22T04:39:04 *** speakeasy2 has quit IRC (Ping timeout: 240 seconds) 2011-11-22T04:39:07 bah, i don't have connection and home and i couldn't push changes to ants-tcp :( 2011-11-22T04:39:11 *** liberforce has joined #aichallenge 2011-11-22T04:44:19 speakeasy: what exactly do you not understand about it? 2011-11-22T04:46:53 im not terribly good at python yet, i started learning it thismorning lol cos java was annnoying me so much, the wiki pages dont give me much insite, can you just give me a brief explanation that i can understand (not wiki style lol) 2011-11-22T04:53:34 speakeasy: start at your "ant" 2011-11-22T04:54:56 for each adjacent tile, check to see if you have visited it before. If you have not visited it before, add this to a FIFO que 2011-11-22T04:55:11 get the next tile from the que... 2011-11-22T04:55:15 rinse and repeat 2011-11-22T04:55:50 how do you mean fifo> 2011-11-22T04:56:09 first in first out? 2011-11-22T04:56:15 sorry im a bit of a noob 2011-11-22T04:56:47 yea First in First out 2011-11-22T04:57:09 a stack (FILO) will not work properly 2011-11-22T04:57:34 well it will then be a depth first search 2011-11-22T04:58:15 speakeasy: you can't really go too far at once if you are starting programing. probably want to get the hang of basic loops and data structures first... 2011-11-22T04:58:21 then try a BFS 2011-11-22T04:58:47 *** mcstar has joined #aichallenge 2011-11-22T04:58:58 how do i make a fifo que? 2011-11-22T04:59:08 ue 2011-11-22T04:59:35 ah sorry, my scrolls going funny yea thats probs a good idea 2011-11-22T05:00:10 *** Euphony has quit IRC (Ping timeout: 265 seconds) 2011-11-22T05:00:16 speakeasy: i don't know python well but i guess basic lists would work... add to front, take from the back 2011-11-22T05:00:22 worry about performance later 2011-11-22T05:00:23 *** Jak_o_Shadows has joined #aichallenge 2011-11-22T05:00:37 take from back? 2011-11-22T05:00:46 *** waroy has quit IRC (Quit: Page closed) 2011-11-22T05:00:55 oh ok, i know why 2011-11-22T05:00:57 nvm 2011-11-22T05:00:59 Linked lists are the typical method of having a fast FIFO or a ring buffer for a bounded size one 2011-11-22T05:01:02 remove the oldest 2011-11-22T05:01:05 thanks so much delt0r 2011-11-22T05:01:15 np 2011-11-22T05:02:03 one implementation detail: you dont actually need to remove anything 2011-11-22T05:02:14 or add, for that matter 2011-11-22T05:02:19 mcstar: don't confuse things! 2011-11-22T05:02:24 :P 2011-11-22T05:02:25 oh yea, i guys you just go from place to place 2011-11-22T05:02:28 lol 2011-11-22T05:02:34 ok :( 2011-11-22T05:02:47 guess* 2011-11-22T05:02:55 details come with understanding... understanding comes from getting something working... IMO anyways 2011-11-22T05:03:20 and the irony is that to get something working you need understanding 2011-11-22T05:03:33 not as much as you think at the start... 2011-11-22T05:03:45 just avoid too many details.. keep things simple 2011-11-22T05:03:58 coffee is brewing 2011-11-22T05:04:02 thats important 2011-11-22T05:04:02 once you have something working ... or not... try to understand why 2011-11-22T05:04:12 * delt0r_ cooofffeeeee 2011-11-22T05:04:27 * delt0r_ gets his coffee vac pot out 2011-11-22T05:04:33 iv managed to tackle the tutorial and have learnt so much so whoever wrote that thanks a ton 2011-11-22T05:04:49 Don't know... perhaps McLeopold? 2011-11-22T05:04:56 he is a python man 2011-11-22T05:04:58 probably 2011-11-22T05:05:13 if you talk to him say hes awesom 2011-11-22T05:05:15 lol 2011-11-22T05:05:25 speakeasy: why dont you tell him? 2011-11-22T05:05:31 leave him a message 2011-11-22T05:05:35 McLeopold: speakeasy says your awesome! 2011-11-22T05:05:35 i have no idea where to find him 2011-11-22T05:05:41 here? 2011-11-22T05:05:44 lols 2011-11-22T05:05:45 ok 2011-11-22T05:08:44 *** ignite has joined #aichallenge 2011-11-22T05:08:55 hi 2011-11-22T05:09:09 is some one here alive? 2011-11-22T05:09:41 only living dead 2011-11-22T05:11:00 witch distance/radius do you take to see if your ant is in danger? 2011-11-22T05:12:08 that depends 2011-11-22T05:12:15 but battle resolution is euclidean based 2011-11-22T05:12:24 ignite: I only look ahead one "turn" 2011-11-22T05:12:49 by which you mean? 2011-11-22T05:12:49 so if they are in combat range after both my ant and the enemy ant moves one square 2011-11-22T05:12:58 attackrad2 or viewrad2? 2011-11-22T05:13:03 both in a sense 2011-11-22T05:13:12 really depends on what you doing 2011-11-22T05:13:17 or want to do 2011-11-22T05:13:25 *** scribble has quit IRC () 2011-11-22T05:13:47 *** replore has quit IRC (Remote host closed the connection) 2011-11-22T05:14:27 you want attackrad2 + 2 euclidian moves 2011-11-22T05:14:30 sorry 2011-11-22T05:14:33 2 manhattan moves 2011-11-22T05:14:38 argh 2011-11-22T05:14:43 argh argh 2011-11-22T05:14:47 mcstar: Well argh'd. 2011-11-22T05:15:09 attackrad2 + 2 yeap 2011-11-22T05:15:25 *** rajanaresh has quit IRC (Ping timeout: 240 seconds) 2011-11-22T05:15:27 but how much is 2 manhattan moves? 2011-11-22T05:15:56 * mcstar follows the prime directive and doesnt interfere 2011-11-22T05:16:47 ignite: what do you mean? 2011-11-22T05:18:42 well distanca is sqrt(attackRadius2)+2 but i dont want to take sqrt 2011-11-22T05:19:10 ah, I didn't find a good closed formula for that either :P 2011-11-22T05:19:43 *** foRei has joined #aichallenge 2011-11-22T05:31:45 *** kilae has joined #aichallenge 2011-11-22T05:37:28 *** speakeasy2 has joined #aichallenge 2011-11-22T05:40:07 #include 2011-11-22T05:40:09 using namespace std; 2011-11-22T05:40:11 int main(void){ 2011-11-22T05:40:13 float num=16.0f; 2011-11-22T05:40:15 int numrep=*reinterpret_cast(&num); 2011-11-22T05:40:17 numrep>>=23; numrep-=127; numrep/=2; numrep+=127; numrep<<=23; 2011-11-22T05:40:19 float sqrtnum=*reinterpret_cast(&numrep); 2011-11-22T05:40:21 cout << "sqrt(" << num << ")=" << sqrtnum << endl; 2011-11-22T05:40:23 return 0; 2011-11-22T05:40:25 } 2011-11-22T05:40:27 thats the closest i can get 2011-11-22T05:42:03 (dont consider using this code instead a simple floating point sqrt) 2011-11-22T05:48:20 wikipedia has a better formula 2011-11-22T05:48:21 use a pastebin like http://pb.lericson.se next time 2011-11-22T05:48:39 numrep-=1<<23; numrep/=2; numrep+=127; numrep+=1<<29; 2011-11-22T05:48:50 use this instead 2011-11-22T05:48:53 lericson: thanks 2011-11-22T05:48:57 i didnt want to 2011-11-22T05:49:45 argh, throw that 127 out, doesnt belong there 2011-11-22T05:49:48 *** ikaros has quit IRC (Ping timeout: 252 seconds) 2011-11-22T05:53:15 *** Fandekasp has quit IRC (Ping timeout: 276 seconds) 2011-11-22T05:54:47 *** ignite has quit IRC (Ping timeout: 265 seconds) 2011-11-22T06:01:11 in python is there anything to have a "list" with 3 collums? 2011-11-22T06:02:33 or a sort of list containing mini lists 2011-11-22T06:07:03 [[0, 1], [2, 3], [3, 4]] 2011-11-22T06:07:37 the inner is the fastest index, i.e. the column 2011-11-22T06:07:45 thats 3 rows and 2 columns 2011-11-22T06:07:51 isnt it? 2011-11-22T06:08:19 yes to your first line. line and column are definition-dependant 2011-11-22T06:08:43 *** mviel_ has joined #aichallenge 2011-11-22T06:11:19 *** Fandekasp has joined #aichallenge 2011-11-22T06:12:00 i think it is best to stick calling that 3 rows and 2 columns 2011-11-22T06:12:10 why go against numpy? 2011-11-22T06:12:12 and c? 2011-11-22T06:12:42 *** mviel has quit IRC (Ping timeout: 260 seconds) 2011-11-22T06:14:36 *** AntDroid has quit IRC (Ping timeout: 265 seconds) 2011-11-22T06:18:48 thanks, that clears lots 2011-11-22T06:18:51 up 2011-11-22T06:19:18 are there any things i can call to find out if there are obsticals in the way? 2011-11-22T06:20:35 no, routing around obstacles is something you have to write yourself 2011-11-22T06:21:09 http://imgur.com/ZkTPJ 2011-11-22T06:21:25 this is the wiki sqrt vs. the normal one 2011-11-22T06:21:57 sorry that was badly put, i was wondering if there was any way of telling where water was 2011-11-22T06:22:48 you get told in your input 2011-11-22T06:22:56 although only once, the first time you see it 2011-11-22T06:23:20 *** Conorach has joined #aichallenge 2011-11-22T06:24:23 ah ok thanks 2011-11-22T06:25:15 *** AlliedEnvy has quit IRC (Remote host closed the connection) 2011-11-22T06:29:03 if attackradius2 is 5, then 2 ants that are [3, 1] apart shouldn't fight, correct? 2011-11-22T06:29:19 *** AlliedEnvy has joined #aichallenge 2011-11-22T06:31:02 http://dl.dropbox.com/u/32496746/antsfightbug.png 2011-11-22T06:31:17 the ants that are near the yellow circle 2011-11-22T06:31:29 they're 3,1 apart, yet fighting 2011-11-22T06:31:35 *** pairofdice has joined #aichallenge 2011-11-22T06:33:29 they dont 2011-11-22T06:33:36 they will after you press > 2011-11-22T06:33:54 >| 2011-11-22T06:33:54 why is that line shown? 2011-11-22T06:34:04 because they are about to engage 2011-11-22T06:34:19 if you are unsure about battle scenarios take a look at my resolver 2011-11-22T06:34:32 https://minus.com/liquid-phynix 2011-11-22T06:34:38 or build it from git 2011-11-22T06:34:39 so if my ant had backed out, it would have lived? 2011-11-22T06:34:46 yes 2011-11-22T06:34:51 Garf: In the next turn, they'll be gone. That's the last time it's possible to show the upcoming engagement. 2011-11-22T06:34:51 do you only get told food the first time you see it? 2011-11-22T06:35:03 speakeasy: no 2011-11-22T06:35:05 speakeasy: No, every turn while it's visible 2011-11-22T06:35:33 cool, thanks 2011-11-22T06:36:47 ok, makes sense now 2011-11-22T06:38:07 hmm, wait 2011-11-22T06:38:53 ah darn 2011-11-22T06:39:01 so you can never actually see the battle positions 2011-11-22T06:39:15 is there anything else that you are only ever told once? 2011-11-22T06:39:46 speakeasy: the settings? 2011-11-22T06:40:00 but no, only water really, because there's so much of it 2011-11-22T06:41:03 ah ok, im just trying to figure out how to read where water is, im getting there 2011-11-22T06:41:07 thanks garf 2011-11-22T06:43:31 *** ikaros has joined #aichallenge 2011-11-22T06:44:32 what is the difference between a variable say var = [] and var = {}? 2011-11-22T06:44:54 list vs hash 2011-11-22T06:45:07 lists are indexed by number. hashes by contents 2011-11-22T06:45:14 aha 2011-11-22T06:45:16 thanks 2011-11-22T06:45:41 hmm, maybe better, by "key", which can be anything 2011-11-22T06:46:10 *** Jak_o_Shadows has quit IRC (Remote host closed the connection) 2011-11-22T06:46:21 so for water locations would i want to be looking at a hash or list? 2011-11-22T06:46:36 dunno, thats your call 2011-11-22T06:46:57 what are the advantages of lists over hashes> 2011-11-22T06:47:12 indexing a list is slightly faster, but can only be done by a numeric index 2011-11-22T06:47:24 you can sort a list 2011-11-22T06:47:34 (it has an order...a hash doesn't) 2011-11-22T06:47:35 not because theres so much of it but because they cant possibly change 2011-11-22T06:47:39 so do i have to specify the key in a hash for each entry? 2011-11-22T06:47:56 yes 2011-11-22T06:47:59 *** ikaros has quit IRC (Client Quit) 2011-11-22T06:48:00 speakeasy: you want a 2d array 2011-11-22T06:48:04 a list works like a[1] = foo 2011-11-22T06:48:06 neither hash nor lists 2011-11-22T06:48:07 thanks 2011-11-22T06:48:09 a hash works like a["whatever" = bar 2011-11-22T06:48:27 ? 2011-11-22T06:48:43 mcstar: imho, thats purely a personal design decision 2011-11-22T06:48:56 imho it isnt 2011-11-22T06:49:21 *** flag has joined #aichallenge 2011-11-22T06:50:11 Garf: why did you say: so you can never actually see the battle positions 2011-11-22T06:50:13 you can use a 1d list, indexed by r*MAX_COLUMNS+row 2011-11-22T06:50:25 you can use a hash, indexed by location, and set water locations = true 2011-11-22T06:50:34 or you can use a list of lists (2d array) 2011-11-22T06:50:57 or you can use a list of locations 2011-11-22T06:51:14 mcstar: you can't see the actual positions of the ants when they battle 2011-11-22T06:51:23 of course you can 2011-11-22T06:52:26 how? 2011-11-22T06:52:44 i alredy told you 2011-11-22T06:52:46 a* 2011-11-22T06:52:57 with the |< and >| buttons 2011-11-22T06:53:26 if you single-step the visualization you can see everything 2011-11-22T06:55:22 and why did you leave numpy arrays out? 2011-11-22T06:55:33 i really dont want to nitpick but that is a trivial alternative 2011-11-22T06:56:41 because its an extension :P 2011-11-22T06:57:11 also, functionalitywise its identical to a list of lists, prolly just more memory-efficient 2011-11-22T06:57:35 Garf: the problem is with types 2011-11-22T06:57:42 a list can hold anything 2011-11-22T06:57:50 a numpy array is typed 2011-11-22T06:58:04 yes, so its more memory efficient, and maye save you some unboxing 2011-11-22T06:58:21 the speed of unboxing is what matters not the memory 2011-11-22T06:58:29 not sure if Pypy does type inference 2011-11-22T06:58:31 is the top left corner (0, 0) 2011-11-22T06:58:34 ? 2011-11-22T06:58:43 yes 2011-11-22T06:58:54 thanks 2011-11-22T06:59:29 *** TheLinker has joined #aichallenge 2011-11-22T07:01:11 coordinates are (y, x), which confused me for a while 2011-11-22T07:01:25 dont think in terms of x,y 2011-11-22T07:01:33 use row/col everywhere 2011-11-22T07:01:39 Yeah, but that's what it is 2011-11-22T07:01:54 not really 2011-11-22T07:01:56 -y,x 2011-11-22T07:03:25 *** Mystret has joined #aichallenge 2011-11-22T07:03:36 hello 2011-11-22T07:03:43 Not that the ants care about map orientation 2011-11-22T07:04:19 but you can get confused, when taking care of wrapping etc. 2011-11-22T07:04:58 i had a bug once, the ant couldnt pass the border of the map 2011-11-22T07:05:11 poor thing was bouncing off of it 2011-11-22T07:07:32 hi, does this make sense: #find land 2011-11-22T07:07:32 for landloc in ants.passable(): 2011-11-22T07:07:32 if landloc not in self.land: 2011-11-22T07:07:32 self.land.append(landloc) 2011-11-22T07:07:43 ? 2011-11-22T07:08:24 Ummm, no 2011-11-22T07:08:29 oh 2011-11-22T07:08:33 ants.passable returns true/false 2011-11-22T07:08:51 isnt that ispassable? 2011-11-22T07:09:23 def passable(self, loc): 2011-11-22T07:09:23 'true if not water' 2011-11-22T07:09:23 row, col = loc 2011-11-22T07:09:23 return self.map[row][col] != WATER 2011-11-22T07:09:34 thats the part in the ant.py 2011-11-22T07:09:49 well its a bool than 2011-11-22T07:10:14 is a bool like a boolean? 2011-11-22T07:10:33 yes? 2011-11-22T07:11:38 what is the smiley of one eyebrow raised? 2011-11-22T07:11:42 and looking curious? 2011-11-22T07:12:37 so if i want to get a map of land locations how would i do this? 2011-11-22T07:13:19 whats wrong with self.map? 2011-11-22T07:13:26 that already has land 2011-11-22T07:13:57 are you speakeasy? 2011-11-22T07:14:46 yes 2011-11-22T07:14:57 on my laptop 2011-11-22T07:15:15 will self.map return everything or just land without water? 2011-11-22T07:15:38 seek for the definition of WATER 2011-11-22T07:15:48 you will find other kinds as well i think 2011-11-22T07:15:59 but i have no idea, and pairofdice is lazy to answer 2011-11-22T07:16:26 sorry if im being a bit of a pain 2011-11-22T07:16:50 youre not a pain, but you should read your bot before you start modding it 2011-11-22T07:17:42 *** limited107 has joined #aichallenge 2011-11-22T07:17:43 there are many people asking for these basic questions and i just dont understand how can they start adding to their starter bot if they dont actually understand it 2011-11-22T07:17:44 Heelo. 2011-11-22T07:17:53 everyone whould go through the source 2011-11-22T07:17:56 should* 2011-11-22T07:17:58 what's mean "Skill" in ranking? 2011-11-22T07:18:04 which files do i need to read? 2011-11-22T07:18:23 just ants.py 2011-11-22T07:18:23 all the files of the python starter bot, if you chose that 2011-11-22T07:18:52 And, MyBot.py, but it's empty. Also... the tutorial 2011-11-22T07:19:45 limited107: try to find the section explaining trueskill on the site 2011-11-22T07:20:01 im just struggling to understand some of the stuff, im getting the hang of it, iv done the tut and understood the steps completely but understanding and recreating are v different 2011-11-22T07:22:34 so in the algorithms on the net where they say graph do i just use self.map? 2011-11-22T07:22:53 *** ikaros has joined #aichallenge 2011-11-22T07:25:44 *** xathis has joined #aichallenge 2011-11-22T07:26:51 *** avdg has joined #aichallenge 2011-11-22T07:27:03 *** replore_ has joined #aichallenge 2011-11-22T07:29:48 *** praveen has joined #aichallenge 2011-11-22T07:30:11 *** avdg1 has quit IRC (Ping timeout: 258 seconds) 2011-11-22T07:30:40 *** g0llum has quit IRC (Read error: Connection reset by peer) 2011-11-22T07:42:58 does this make sense? 2011-11-22T07:43:00 def land(self): 2011-11-22T07:43:00 land = [] 2011-11-22T07:43:00 for row in self.map: 2011-11-22T07:43:01 for col in self.map: 2011-11-22T07:43:01 if self.map[row][col] != WATER: 2011-11-22T07:43:01 land.append(row, col) 2011-11-22T07:43:01 return land 2011-11-22T07:43:51 MY_ANT = 0 2011-11-22T07:43:54 ANTS = 0 2011-11-22T07:43:56 DEAD = -1 2011-11-22T07:43:58 LAND = -2 2011-11-22T07:44:00 FOOD = -3 2011-11-22T07:44:02 WATER = -4 2011-11-22T07:44:04 you see there is land in the map 2011-11-22T07:44:07 CATS = -5 2011-11-22T07:44:35 why do you want a duplicate structure? 2011-11-22T07:44:44 ZAO=-inf 2011-11-22T07:44:51 \o/ 2011-11-22T07:45:12 *** flag has quit IRC (Read error: Operation timed out) 2011-11-22T07:45:26 so i can go and say ants.land as the graph for the pathfinding algorithm 2011-11-22T07:46:21 will that work? 2011-11-22T07:46:33 i guess you could make a complete copy of the map, and use that for your pathfinding, scribble on it, and rest or dispose of it 2011-11-22T07:46:44 reset* 2011-11-22T07:47:09 i was only really looking for the land cells as thats what i think the algorithm needs 2011-11-22T07:47:09 speakeasy2: i guess map is just a nested list 2011-11-22T07:47:12 *** GeorgeSebastian has joined #aichallenge 2011-11-22T07:47:12 *** GeorgeSebastian has joined #aichallenge 2011-11-22T07:48:07 [[self.map[x][y]==LAND for y in self.map.size[1]] for x in self.map.size[0]] 2011-11-22T07:48:18 i guess this could work 2011-11-22T07:48:28 you get true where land is and false where it isnt 2011-11-22T07:48:49 im not sure im doing this right 2011-11-22T07:48:53 sec 2011-11-22T07:49:11 i might be off by 1 in the indexing 2011-11-22T07:49:15 1 procedure BFS(Graph,source): 2011-11-22T07:49:15 2 create a queue Q 2011-11-22T07:49:15 3 enqueue source onto Q 2011-11-22T07:49:15 4 mark source 2011-11-22T07:49:15 5 while Q is not empty: 2011-11-22T07:49:16 6 dequeue an item from Q into v 2011-11-22T07:49:16 7 for each edge e incident on v in Graph: 2011-11-22T07:49:17 8 let w be the other end of e 2011-11-22T07:49:17 9 if w is not marked: 2011-11-22T07:49:17 i dont use python regualrly 2011-11-22T07:49:18 10 mark w 2011-11-22T07:49:18 11 enqueue w onto Q 2011-11-22T07:49:28 *** delt0r_ has quit IRC (Ping timeout: 240 seconds) 2011-11-22T07:49:32 thats the psudo code im trying to get in 2011-11-22T07:49:46 *** u_ has joined #aichallenge 2011-11-22T07:50:33 what does it want as the graph in the parenthesis? 2011-11-22T07:51:05 heh, pythons lists dont have size 2011-11-22T07:51:09 sorry 2011-11-22T07:51:24 you have to call len each time 2011-11-22T07:51:28 and use xrange 2011-11-22T07:51:51 what is that looking for for the graph variable? 2011-11-22T07:52:09 anything 2011-11-22T07:52:15 since its a pseudocode 2011-11-22T07:52:37 its a collection of vertices 2011-11-22T07:52:42 so i could just put a list with land cells in it 2011-11-22T07:52:45 but it isnt specified what IT is 2011-11-22T07:52:48 ah, that makes sense 2011-11-22T07:54:19 so on the first line where i define a function could i use my bit of code in the ants.py file and say def pathfind (ants.land, ant_loc) 2011-11-22T07:55:42 [[sekf.map[row][col]==LAND for col in xrange(len(self.map[row]))] for row in xrange(len(self.map))] 2011-11-22T07:55:46 *** ikaros has quit IRC (Quit: Verlassend) 2011-11-22T07:56:00 this code will create your land if you still want 2011-11-22T07:56:20 depends 2011-11-22T07:56:36 can i put that in the parenthesis in the mybot.py file seeing as self is refering to well self 2011-11-22T07:56:37 depends on what is the operation you check membership 2011-11-22T07:57:23 how do you mean 2011-11-22T07:57:42 what is land? 2011-11-22T07:57:53 damn my hill protection code is taking a long time to write 2011-11-22T07:57:54 is it a simple list holding coordinate pairs? 2011-11-22T07:57:57 i'm pretty stoked on it though 2011-11-22T07:58:02 is it a map? 2011-11-22T07:58:09 or is it a 2d array? 2011-11-22T07:58:26 i think so 2011-11-22T07:58:29 lol, i thought nobody had said anything for hours but i was just stuck way up the page :{ 2011-11-22T07:58:29 speakeasy2: these questions are needed to be asnwered by you, its going to be your algorith 2011-11-22T07:58:31 m 2011-11-22T07:58:43 i think it is a list of coordinate pairs 2011-11-22T07:58:59 ok, i think you can use python "in" then 2011-11-22T07:59:03 i think 2011-11-22T07:59:21 yes 2011-11-22T07:59:28 but that costs much 2011-11-22T07:59:44 in needs to travel the whole way 2011-11-22T07:59:47 lol, bot.cc is over 1000 lines long and state.cc is over 700 lines long :| 2011-11-22T08:00:15 antimatroid: im still writing collaboration 2011-11-22T08:00:21 well, not right now 2011-11-22T08:00:30 collaboration with who? 2011-11-22T08:00:34 why doesnt anybody help this guy??? 2011-11-22T08:00:35 i don't trust my opponents 2011-11-22T08:00:38 i dont like python 2011-11-22T08:00:39 how would i use the in? 2011-11-22T08:00:47 * antimatroid hates python too :P 2011-11-22T08:01:04 speakeasy2: [0,0] in land 2011-11-22T08:01:08 i try to assume my opponents will do what's worst for me 2011-11-22T08:01:10 if land is a list of pairs 2011-11-22T08:01:22 land=[[3,4],[6,4],[9,6]...] 2011-11-22T08:01:29 so 2011-11-22T08:01:33 [0,0] in land 2011-11-22T08:01:40 will give you true or false 2011-11-22T08:01:53 *** Israfel has quit IRC (Ping timeout: 260 seconds) 2011-11-22T08:02:09 *** delt0r_ has joined #aichallenge 2011-11-22T08:02:27 * antimatroid dives back into writing this horrendous function 2011-11-22T08:02:32 thanks 2011-11-22T08:02:36 lol 2011-11-22T08:02:58 in the end i'm doing like a bfs inside a bfs inside a bfs 2011-11-22T08:03:13 i hope it's going to run alright 2011-11-22T08:03:15 i think it should 2011-11-22T08:03:56 ^^ 2011-11-22T08:05:16 hah 2011-11-22T08:05:23 @staticmethod 2011-11-22T08:05:24 mcstar: User error, it's not my fault. 2011-11-22T08:05:53 i see how that can be confusing for a newbie 2011-11-22T08:06:28 what can? 2011-11-22T08:06:42 wll, run() is a @staticmethod 2011-11-22T08:06:54 it is not a class member, i.e. not Ants's member 2011-11-22T08:07:04 but you still call it from main like: Ants.run() 2011-11-22T08:07:20 i dont see whats the point 2011-11-22T08:07:40 maybe has something to do with member variable access 2011-11-22T08:07:42 idk 2011-11-22T08:07:55 is it appened or append, my spelling fails 2011-11-22T08:08:02 append 2011-11-22T08:08:06 cheers 2011-11-22T08:09:41 is it possible to do for all directions? 2011-11-22T08:09:53 what is? 2011-11-22T08:10:02 *** Fandekasp has quit IRC (Ping timeout: 245 seconds) 2011-11-22T08:10:40 can i do something similar to "for directions in n, e, s, w 2011-11-22T08:11:06 for direction in (n,e,s,w): 2011-11-22T08:11:15 for direction in directions 2011-11-22T08:11:18 for direction in ('n','e','s','w'): 2011-11-22T08:11:52 will either of those work? 2011-11-22T08:11:54 antimatroid: collaboration with each other 2011-11-22T08:12:15 for my own ants to colaborate 2011-11-22T08:12:43 or you might call it ant-formations whatever 2011-11-22T08:13:07 for battles? 2011-11-22T08:13:22 mine ought to do that with my battle code naturally 2011-11-22T08:13:32 antimatroid: really? 2011-11-22T08:13:37 from long distance? 2011-11-22T08:13:45 this is pre-battle colaboration 2011-11-22T08:13:48 l 2011-11-22T08:14:05 oh no, they will collaborate in the battle situation 2011-11-22T08:14:15 the rest is me correctly using ants 2011-11-22T08:14:23 im writing code so that they can chase an enemy togther 2011-11-22T08:14:23 ie. funnelling enough ants into battles 2011-11-22T08:14:33 and when possible ill call the kill shot 2011-11-22T08:14:48 mine will do the kill shots when possible 2011-11-22T08:15:09 it literally does the minimax thing on partitions of all ants that can land in a battle next turn 2011-11-22T08:15:15 antimatroid: it is a physical impossibility to do it when it isnt possible 2011-11-22T08:15:36 ok 2011-11-22T08:15:43 but i dont want to wait for those to happen 2011-11-22T08:15:53 i want my ants to create proper battle situations 2011-11-22T08:15:55 *** speakeasy has quit IRC (Ping timeout: 265 seconds) 2011-11-22T08:16:01 when enumeration makes sense 2011-11-22T08:16:02 what is the sintax to do check if something is in something else? 2011-11-22T08:16:35 xyz in bleelbooblaa: 2011-11-22T08:16:37 speakeasy2: look at the pre existing code for any strategy stuff and work out what that's doing 2011-11-22T08:18:08 thanks 2011-11-22T08:18:20 *** limited107 has quit IRC (Ping timeout: 265 seconds) 2011-11-22T08:18:29 speakeasy2: how about walking through some python tutorials as well? 2011-11-22T08:19:37 that might not be such a bad idea but im not sure which ones, the begginer ones i know the stuff like how to run a python program but more advanced im not sure what to search for 2011-11-22T08:21:04 *** rexou has quit IRC (Ping timeout: 240 seconds) 2011-11-22T08:22:16 oh god excepting bugs it's running 2011-11-22T08:22:32 *** rexou has joined #aichallenge 2011-11-22T08:27:25 *** Fandekasp has joined #aichallenge 2011-11-22T08:28:46 *** mviel__ has joined #aichallenge 2011-11-22T08:29:52 *** speakeasy2 has quit IRC (Ping timeout: 240 seconds) 2011-11-22T08:32:35 *** mviel_ has quit IRC (Ping timeout: 252 seconds) 2011-11-22T08:36:06 *** AntDroid has joined #aichallenge 2011-11-22T08:38:28 *** knight__ has joined #aichallenge 2011-11-22T08:38:46 this is perfectly exciting 2011-11-22T08:38:57 *** knight__ has quit IRC (Client Quit) 2011-11-22T08:39:05 creating something out of ether 2011-11-22T08:45:13 *** ikaros has joined #aichallenge 2011-11-22T08:48:54 i cant get to stop repating that stupid lemon tree song in my head 2011-11-22T08:49:58 It's just another lemon tree 2011-11-22T08:50:33 * mcstar is whistling 2011-11-22T08:50:55 pie = optimal policy 2011-11-22T09:05:52 *** antimatroid has quit IRC (Ping timeout: 240 seconds) 2011-11-22T09:06:45 pairofdice: whats that? 2011-11-22T09:09:07 *** amstan_ has joined #aichallenge 2011-11-22T09:09:07 *** ChanServ sets mode: +o amstan_ 2011-11-22T09:10:23 *** hacklash has quit IRC (Ping timeout: 248 seconds) 2011-11-22T09:11:22 *** GeorgeSebastian has quit IRC (Read error: Connection reset by peer) 2011-11-22T09:11:54 *** g0llum has joined #aichallenge 2011-11-22T09:13:48 hehe 2011-11-22T09:13:57 my collboration code is sort of working 2011-11-22T09:14:09 they suicide 2011-11-22T09:14:16 so im halfway there 2011-11-22T09:15:45 corrected 2011-11-22T09:16:40 *** sigh has quit IRC (Remote host closed the connection) 2011-11-22T09:23:10 *** antimatroid has joined #aichallenge 2011-11-22T09:23:23 Bot peaked at rank 126, going down again 2011-11-22T09:23:52 *** mj41 has quit IRC (Ping timeout: 244 seconds) 2011-11-22T09:24:07 does "before" imply the ordering of events by time? 2011-11-22T09:24:16 ie. does it make sense to talk about something existing before time existed? 2011-11-22T09:24:27 Yes and no 2011-11-22T09:24:53 why? 2011-11-22T09:25:35 depends on the theory 2011-11-22T09:26:15 if time was created in the instant of creation, but there are other spaces and times, then it is correct to speak of before 2011-11-22T09:26:17 i think 2011-11-22T09:26:33 because a sort of causality can connect multiple time-lines 2011-11-22T09:26:42 no? 2011-11-22T09:27:31 Only if there is a connection 2011-11-22T09:27:50 well thats what im saying 2011-11-22T09:27:54 Yeah 2011-11-22T09:28:00 if our time/space was created from another one 2011-11-22T09:29:15 *** twymer has joined #aichallenge 2011-11-22T09:29:19 But if there was nothing in between... 2011-11-22T09:29:42 this sort of sucks 2011-11-22T09:29:47 because of relativity 2011-11-22T09:30:37 i mean spec.rel. shows you that simultainity is relative to the observer 2011-11-22T09:31:00 so what is before for one observer can be after for another 2011-11-22T09:31:35 im just gald that space/time is close to euclidean where i live 2011-11-22T09:32:17 *** GeorgeSebastian has joined #aichallenge 2011-11-22T09:33:00 Your boss would have to be really cool to accept a "there's no simultaneity" argument for you being late for work :) 2011-11-22T09:34:13 *** Areks has quit IRC (Ping timeout: 240 seconds) 2011-11-22T09:35:13 *** Blkt has joined #aichallenge 2011-11-22T09:35:48 yeah... 2011-11-22T09:35:59 btw honey-pancakes arent that bad 2011-11-22T09:37:29 *** amstan_ has quit IRC (Ping timeout: 252 seconds) 2011-11-22T09:37:30 antimatroid: so how well does your battle code? 2011-11-22T09:37:43 is it defensive or can it kill too? 2011-11-22T09:37:55 *** GeorgeSebastian has quit IRC (Ping timeout: 244 seconds) 2011-11-22T09:39:43 *** mj41 has joined #aichallenge 2011-11-22T09:43:42 *** amstan_ has joined #aichallenge 2011-11-22T09:43:42 *** ChanServ sets mode: +o amstan_ 2011-11-22T09:44:51 *** praveen has quit IRC (Ping timeout: 265 seconds) 2011-11-22T09:51:00 *** GeorgeSebastian has joined #aichallenge 2011-11-22T09:55:23 *** ThatSnail has joined #aichallenge 2011-11-22T09:56:00 *** amstan_ has quit IRC (Ping timeout: 244 seconds) 2011-11-22T10:02:16 *** Harpyon has joined #aichallenge 2011-11-22T10:02:41 mcstar: i think it does alright 2011-11-22T10:02:56 thats scary 2011-11-22T10:03:00 why? 2011-11-22T10:03:06 i wont let my botnear yours 2011-11-22T10:03:16 hehe, i'm not letting it out in public just yet 2011-11-22T10:03:27 i'm still working on some other things, then i'll re analyse all my battle stuff 2011-11-22T10:03:32 then i'll let it loose on tcp 2011-11-22T10:03:53 =) 2011-11-22T10:04:02 sounds dangerous 2011-11-22T10:04:14 hopefully i don't hype it too much 2011-11-22T10:04:26 i don't expect it to win 2011-11-22T10:04:44 top 10 would be nice though 2011-11-22T10:05:07 but i don't really have much idea about the competition for this 2011-11-22T10:16:06 lol 2011-11-22T10:16:11 i cant see colors 2011-11-22T10:16:35 after i peek at my debug images, which have red background 2011-11-22T10:16:40 and i change here to irc 2011-11-22T10:16:52 i cant see nick-colors for s short while 2011-11-22T10:38:23 *** raemde is now known as IchBinDasWir 2011-11-22T10:45:32 *** snthaoeu has quit IRC (Quit: Page closed) 2011-11-22T10:47:37 *** kilae has quit IRC (Quit: ChatZilla 0.9.87 [Firefox 8.0/20111104165243]) 2011-11-22T10:49:52 *** GeorgeSebastian has quit IRC (Quit: popped out) 2011-11-22T10:50:16 *** GeorgeSebastian has joined #aichallenge 2011-11-22T10:50:50 *** praveen has joined #aichallenge 2011-11-22T10:56:17 *** GeorgeSebastian has quit IRC (Ping timeout: 245 seconds) 2011-11-22T11:00:09 *** Hexren has joined #aichallenge 2011-11-22T11:00:13 *** Hexren has left #aichallenge 2011-11-22T11:04:18 *** zacharyd1nton has quit IRC (Read error: Connection reset by peer) 2011-11-22T11:08:28 players currently in tcp server are mostly the best. Before I could see my bot perform, they destroy it. Poor bot doesnt even know the enemy exists! 2011-11-22T11:10:56 :D 2011-11-22T11:15:29 *** aerique has quit IRC (Quit: ...) 2011-11-22T11:22:21 *** iglo has joined #aichallenge 2011-11-22T11:23:58 *** TheLinker has quit IRC (Quit: Bye) 2011-11-22T11:25:42 *** GeorgeSebastian has joined #aichallenge 2011-11-22T11:39:26 hi 2011-11-22T11:41:54 *** amstan_ has joined #aichallenge 2011-11-22T11:41:54 *** ChanServ sets mode: +o amstan_ 2011-11-22T11:49:46 there are enough players constantly on these tcp servers that it would make sense to try to do matchmaking 2011-11-22T11:53:03 *** mj41 has quit IRC (Ping timeout: 248 seconds) 2011-11-22T11:55:28 Matchmaking is necessary. If I get to play with average bots I would know what has to be improved. 2011-11-22T11:55:49 praveen: you do know now too 2011-11-22T11:55:56 => everything 2011-11-22T11:56:20 praveen: can you link a game? 2011-11-22T11:57:30 mcstar: http://ants.fluxid.pl/replay.10679 Could not figure out what I should focus on - a little help? 2011-11-22T11:58:26 even at turn 15 you bot has half the food of the others 2011-11-22T11:59:08 Yeah Initial food collection is not efficient I know 2011-11-22T11:59:15 they engage in situations they cantwin 2011-11-22T11:59:18 try to get the next food first 2011-11-22T11:59:24 would be a first step =) 2011-11-22T11:59:39 May be I will start working on this first - yeah next food first 2011-11-22T11:59:50 *** JorgeB has joined #aichallenge 2011-11-22T12:00:03 praveen: add some kind of defensive strategy too 2011-11-22T12:00:12 its really simple 2011-11-22T12:00:18 and your bot will last longer 2011-11-22T12:00:21 Good offense is the best defense ;) 2011-11-22T12:00:28 later... 2011-11-22T12:00:30 mcstar: defensive - for hill or for ants not walking directly to the enemy 2011-11-22T12:00:36 for ants 2011-11-22T12:00:45 defence makes your food collections inefficient 2011-11-22T12:00:49 dont go into 4vs1 battles and alike 2011-11-22T12:01:00 no 2011-11-22T12:01:10 thats not my experience 2011-11-22T12:01:11 mcstar: it doesnt know about enemy ants right now, I will add that first 2011-11-22T12:01:18 k 2011-11-22T12:02:14 mcstar: I feel for the most efficient food collection in the beginning stages, maximum matching in bipartite graph is best. But feel dont need to go to that level. anybody doing this? 2011-11-22T12:02:33 i did in my common lisp bot 2011-11-22T12:02:58 but its totally unncessary if you have a good override 2011-11-22T12:03:02 Oh, How good was it? 2011-11-22T12:03:08 very good 2011-11-22T12:03:26 but not better on average than this one 2011-11-22T12:03:39 You are using that now in your bots? 2011-11-22T12:03:45 no 2011-11-22T12:03:50 thats what im saying 2011-11-22T12:03:54 it isnt necessary 2011-11-22T12:04:30 in the beginnig you have food collection + exploration 2011-11-22T12:04:58 and i think the imperfection that my alg. or other non-perfect alg. bring in, it makes up for that in exploration 2011-11-22T12:05:12 Yeah true 2011-11-22T12:05:54 the reason for not creating defensive strategy is, right now am experimenting exploration. If 2011-11-22T12:06:03 sorry- ignore the prev comment 2011-11-22T12:07:09 I can understand whether my exploration is good, only if it does the exploration part alone. If I do exploration + some defense, I could not figure out which one is going wrong. Anyways I feel I need to add this to make some progress 2011-11-22T12:07:47 better bots will hunt your lone ants down 2011-11-22T12:07:55 wo any kind of defense easily 2011-11-22T12:08:07 if you try to avoid them, you gain a bit of time 2011-11-22T12:08:18 until you hit water, and you will die then 2011-11-22T12:08:30 mcstar: Yeah exactly the same happening. Thats why I wanted to play with bots of my level. 2011-11-22T12:09:04 i suggest you maximize exploration + food collection by playing against your bot 2011-11-22T12:09:04 mcstar: Will get coding. Thanks for the pointers 2011-11-22T12:09:08 in a very defensive mode 2011-11-22T12:09:29 yeah ok 2011-11-22T12:09:40 if you can beat your defensive bot with the new one every time (i.e. can collect overwhelmingly more food) you can stop 2011-11-22T12:12:39 morning 2011-11-22T12:12:48 hardly 2011-11-22T12:12:55 Hey guys, since you're talking about strategy, I'd like to have an analyse from someone further than I. I've made a "correct" IA which explores well attack hills & rush food. Now I have the (huge) issue of close fight (because I basically lose every single ant against wall of ants) 2011-11-22T12:13:10 ia? 2011-11-22T12:13:14 internal affairs? 2011-11-22T12:13:21 Infernal Ants 2011-11-22T12:13:22 sorry french there :p 2011-11-22T12:13:22 ai 2011-11-22T12:13:24 Surya: you need an ai 2011-11-22T12:13:26 héh :) 2011-11-22T12:13:53 I'm not going to tell you how to beat my bot :) 2011-11-22T12:14:00 same here 2011-11-22T12:14:04 anyway, the first step i have in mind is to back off my ants if the situation is bad. 2011-11-22T12:14:09 Surya: but goo luck 2011-11-22T12:14:13 d 2011-11-22T12:14:20 But i have no idea for attacking 2011-11-22T12:14:21 thats excellent 2011-11-22T12:14:29 My question is this one : (wait for it :)) 2011-11-22T12:14:31 thats what i suggested to praveen 2011-11-22T12:14:56 How hard is it? Compared to the rest? Is it like 10 times harder? I'm thinking of a minimax for every dangerous area 2011-11-22T12:15:00 but i will timeout 2011-11-22T12:15:09 Basic combat is pretty easy 2011-11-22T12:15:11 I know it 2011-11-22T12:15:33 minimax is a bad idea 2011-11-22T12:15:36 *** amstan_ has quit IRC (Read error: Connection reset by peer) 2011-11-22T12:15:46 ok 2011-11-22T12:15:56 What do you call "basic combat"? 2011-11-22T12:16:02 I'd like to stop losing all my ants 1vs10 2011-11-22T12:16:13 thats easy 2011-11-22T12:16:18 avoid them 2011-11-22T12:16:23 If your ants are outnumbered, fall back, else close in 2011-11-22T12:16:34 basic. 2011-11-22T12:16:42 visual. 2011-11-22T12:16:47 lol :) 2011-11-22T12:17:08 Ok, i'll do my best 2011-11-22T12:17:14 Thanks for your answers :) 2011-11-22T12:18:44 Surya: the minimax approach is not a good way, but there are things resembling it 2011-11-22T12:18:48 if all my games went this well I'd be #1! http://aichallenge.org/visualizer.php?game=114769&user=3473 2011-11-22T12:19:04 you can try that, and see where do you need to change what, and what restrictions apply 2011-11-22T12:19:50 BenJackson: nice, but you need to spread those ants 2011-11-22T12:19:54 Surya: fwiw the combat in my bot there (white) is pretty basic 2011-11-22T12:19:59 when you hill is not in danger 2011-11-22T12:20:01 r 2011-11-22T12:20:15 mcstar: oh I know, if I could figure out how to integrate THAT with everything else I'd resubmit 2011-11-22T12:20:40 bbs, appointment 2011-11-22T12:22:54 *** AntDroid has quit IRC (Ping timeout: 265 seconds) 2011-11-22T12:27:11 *** ALplus has joined #aichallenge 2011-11-22T12:36:22 *** GeorgeSebastian has quit IRC (Read error: Connection reset by peer) 2011-11-22T12:39:06 *** Blkt has quit IRC (Read error: Connection reset by peer) 2011-11-22T12:39:30 *** gyc has joined #aichallenge 2011-11-22T12:40:25 *** liberforce has left #aichallenge 2011-11-22T12:41:16 *** gyc has quit IRC (Client Quit) 2011-11-22T12:44:35 BenJackson: haha nice 2011-11-22T12:48:20 his ants are very hot 2011-11-22T12:56:05 http://aichallenge.org/visualizer.php?game=116183&user=12 2011-11-22T12:56:07 this is nice 2011-11-22T12:56:30 *** GeorgeSebastian has joined #aichallenge 2011-11-22T13:00:07 if someone would not understand my amusement: i timed out and still won, wtf? 2011-11-22T13:02:47 :-) 2011-11-22T13:02:57 *** GeorgeSebastian has quit IRC (Ping timeout: 245 seconds) 2011-11-22T13:03:04 *** Surya has quit IRC (Quit: Page closed) 2011-11-22T13:03:10 *** treeform has joined #aichallenge 2011-11-22T13:15:35 *** GeorgeSebastian has joined #aichallenge 2011-11-22T13:16:36 *** Antvolution has joined #aichallenge 2011-11-22T13:19:27 mcstar: you didn't timeout, you crashed 2011-11-22T13:20:55 whatever :D 2011-11-22T13:23:05 strategic crashing 2011-11-22T13:23:14 then he waited for purple to throw some ants on his static pile 2011-11-22T13:25:52 *** kilae has joined #aichallenge 2011-11-22T13:27:47 *** NightExcessive has quit IRC (Ping timeout: 255 seconds) 2011-11-22T13:27:48 i should have not win that 2011-11-22T13:29:07 *** bergmark has quit IRC (Read error: Operation timed out) 2011-11-22T13:30:47 *** cyphase has quit IRC (Read error: Connection reset by peer) 2011-11-22T13:30:52 *** bhasker has quit IRC (Quit: bhasker) 2011-11-22T13:30:54 BenJackson: have you win a game against x.athis? 2011-11-22T13:30:55 *** ThatSnail_ has joined #aichallenge 2011-11-22T13:31:52 *** ThatSnail_ has joined #aichallenge 2011-11-22T13:34:16 *** ThatSnail has quit IRC (Ping timeout: 240 seconds) 2011-11-22T13:34:17 *** ThatSnail_ is now known as ThatSnail 2011-11-22T13:42:35 *** NightExcessive has joined #aichallenge 2011-11-22T13:45:01 *** Dlayne has joined #aichallenge 2011-11-22T13:58:11 *** GeorgeSebastian has quit IRC (Ping timeout: 252 seconds) 2011-11-22T14:02:18 *** Marce_ has joined #aichallenge 2011-11-22T14:02:33 Hello all 2011-11-22T14:07:56 hi 2011-11-22T14:14:19 This is a really silly question: How do I get python to output to the console? 2011-11-22T14:14:26 Print() doesn't work 2011-11-22T14:14:59 you need to write to stderr and configure playgame.py to print stderr output from the bot 2011-11-22T14:16:37 Thanks, I'll try that 2011-11-22T14:18:42 *** bhasker has joined #aichallenge 2011-11-22T14:20:24 Woot, got it. Thanks again. 2011-11-22T14:20:58 Ahh, -E and -e 2011-11-22T14:26:16 *** choas has joined #aichallenge 2011-11-22T14:26:59 i reached 64. my bot is almost not very bad now 2011-11-22T14:27:40 64 skill, not rank 2011-11-22T14:27:52 *** NightExcessive has quit IRC (Quit: Ciao.) 2011-11-22T14:28:57 *** Redgis has joined #aichallenge 2011-11-22T14:38:17 somehow I got back to 21st after slipping quite a bit yesterday 2011-11-22T14:38:31 skill hovering around 82 2011-11-22T14:38:37 *** antonh has quit IRC (Ping timeout: 244 seconds) 2011-11-22T14:40:56 *** antonh has joined #aichallenge 2011-11-22T14:42:36 *** speakeasy has joined #aichallenge 2011-11-22T14:50:36 @seen amstan 2011-11-22T14:50:36 Fluxid: amstan was last seen in #aichallenge 19 hours, 30 minutes, and 33 seconds ago: mcstar: is this from last week or something? i don't remember it 2011-11-22T14:50:44 @seen McLeopold 2011-11-22T14:50:44 Fluxid: McLeopold was last seen in #aichallenge 11 hours, 46 minutes, and 25 seconds ago: he has, he's got some nice cell automation stuff 2011-11-22T14:50:49 woooot? 2011-11-22T14:51:03 what timezone are they -_-' 2011-11-22T14:51:04 Fluxid: why did you wake me? 2011-11-22T14:51:23 mcstar: i didn't mean to wake you, sorry! 2011-11-22T14:51:27 kidding 2011-11-22T14:51:34 us something 2011-11-22T14:52:30 amstan probably attends the uni of waterloo 2011-11-22T14:52:36 does anyone know: 1. can i upload compiled c extension for python 2. what arch is used, amd64 or x86? 2011-11-22T14:52:40 i guess, so its us western time? 2011-11-22T14:52:55 Fluxid: I don't think so 2011-11-22T14:53:02 why not? 2011-11-22T14:53:09 oh, you mean YOU'd compile 2011-11-22T14:53:09 you can 2011-11-22T14:53:12 yes 2011-11-22T14:53:13 i remember someone said i can, but i wanted to make sure 2011-11-22T14:53:15 and put the .so 2011-11-22T14:53:19 BenJackson: yeah, .so 2011-11-22T14:53:24 in that case build for both :) 2011-11-22T14:53:30 i thought of that 2011-11-22T14:53:37 alternatively convert your bot to C or C++ 2011-11-22T14:53:49 have MyBot.cc exec python on whatever.py 2011-11-22T14:53:57 Fluxid: speed problems at last? 2011-11-22T14:54:03 BenJackson: nah, too much work. i just want time critical part to be rewriten in C (i already have some C code) 2011-11-22T14:54:09 well, I guess that way you can't exec python, you'd have to start an interpreter 2011-11-22T14:54:20 Fluxid: I don't mean change your code 2011-11-22T14:54:31 I mean change your language so the build would compile your C extensino 2011-11-22T14:54:37 and then your C would actually run your python bot 2011-11-22T14:55:03 BenJackson: how? 2011-11-22T14:55:08 thats another process 2011-11-22T14:55:10 BenJackson: wow, i did once python embedding, but... that would be too much work now 2011-11-22T14:55:16 i think the engine would kill it 2011-11-22T14:55:28 exec replaces 2011-11-22T14:55:29 hang on 2011-11-22T14:55:34 mcstar: no, this would embed python interpreter in C binary 2011-11-22T14:55:41 http://docs.python.org/extending/embedding.html 2011-11-22T14:55:41 that would be still one process 2011-11-22T14:55:43 oh 2011-11-22T14:55:44 yup 2011-11-22T14:56:01 there's an example, even 2011-11-22T14:56:05 but isnt that large or something? 2011-11-22T14:56:12 nah 2011-11-22T14:56:14 *** Accoun has quit IRC () 2011-11-22T14:56:25 as long as i don't need to link staticaly 2011-11-22T14:56:41 btw, can i make "statically linked shared library"? 2011-11-22T14:56:48 no 2011-11-22T14:56:56 i thought so 2011-11-22T14:57:13 well, i'll compile for both archs and upload 2011-11-22T14:57:15 ohhh my embedding idea might fail because you need link flags 2011-11-22T14:57:54 then... 2011-11-22T14:57:59 dynamic loading~~~~ 2011-11-22T14:58:04 even more work! 2011-11-22T14:58:36 damn, i can't compile for 32-bit with 64-bit python headers 2011-11-22T15:01:55 Branch/Version Information: epsilon 3b7d6b5 [origin/epsilon] Use the right (64bit) version of pypy 2011-11-22T15:02:05 so the arch is x86_64 2011-11-22T15:02:53 Fluxid: 2011-11-22T15:03:23 >pypy 2011-11-22T15:03:27 holy shit 2011-11-22T15:03:40 they finally used pypy? 2011-11-22T15:03:57 i dont know 2011-11-22T15:03:58 if you submit as MyBot.pypy yes 2011-11-22T15:04:01 seems so 2011-11-22T15:04:09 whoooo 2011-11-22T15:04:20 then i'll maybe port from python 3 to pypy? 2011-11-22T15:04:33 Fluxid: why are you asking? 2011-11-22T15:05:17 no idea, this question mark just really wanted to be there 2011-11-22T15:05:50 What's so special about pypy& 2011-11-22T15:06:27 cause its pure python? and fast?(heard) 2011-11-22T15:06:36 BenJackson: if code is well written, it can get over 4.7x faster 2011-11-22T15:06:43 nice 2011-11-22T15:06:56 it's good for number-crunching 2011-11-22T15:07:23 I wrote a JIT for a language once which made things like number crunching much faster 2011-11-22T15:07:31 i guess its mentally pleasing that it stands on its own? 2011-11-22T15:07:32 then I realized most of what people did in that language was concatenate strings 2011-11-22T15:07:41 which got very little benefit 2011-11-22T15:07:49 but JIT needs warmup, at the beginning it can be few times slower :P 2011-11-22T15:08:13 BenJackson: pypy actually isn't just python, but interpreter+jit framework, you can implement other languages in it 2011-11-22T15:09:23 the holograms on my new DIscover card are cool 2011-11-22T15:10:25 *** Dlayne has left #aichallenge 2011-11-22T15:12:27 *** Accoun has joined #aichallenge 2011-11-22T15:13:29 *** epicmonkey has joined #aichallenge 2011-11-22T15:14:25 *** grom has quit IRC (Read error: Connection reset by peer) 2011-11-22T15:14:47 *** flag has joined #aichallenge 2011-11-22T15:14:55 *** ALplus has quit IRC (Ping timeout: 260 seconds) 2011-11-22T15:17:08 c extension worked 2011-11-22T15:21:05 *** onion42 has joined #aichallenge 2011-11-22T15:21:38 i've updated tcpclient.py on tcp server 2011-11-22T15:22:19 it is compatible with both py2 and py3, forward all content to bot and be nicer to bot processes 2011-11-22T15:22:28 forwards* 2011-11-22T15:22:32 *** AndrewBC has quit IRC (Ping timeout: 245 seconds) 2011-11-22T15:23:05 *** krishna has quit IRC (Ping timeout: 260 seconds) 2011-11-22T15:23:05 *** a1k0n has quit IRC (Ping timeout: 260 seconds) 2011-11-22T15:30:46 *** AndrewBC has joined #aichallenge 2011-11-22T15:31:36 *** a1k0n has joined #aichallenge 2011-11-22T15:33:33 f me hard 2011-11-22T15:34:06 i copied code from another function, it had a return in it, and im wondering why does it show my debug message at the end 2011-11-22T15:34:17 doesnt* 2011-11-22T15:35:21 how to get the rows and cols from the state.h into the bot.cc ? (coding in c++; almost everything is starterpackage) 2011-11-22T15:35:50 *** krishna has joined #aichallenge 2011-11-22T15:35:50 *** smarsh has joined #aichallenge 2011-11-22T15:36:04 really? they support pypy now? 2011-11-22T15:36:10 state.rows 2011-11-22T15:36:16 *** jstrong has joined #aichallenge 2011-11-22T15:36:29 *** jstrong is now known as roflmao 2011-11-22T15:37:10 maybe I should ditch my badly written cython extension... 2011-11-22T15:38:32 thanks 2011-11-22T15:38:41 i wrote State.rows ... 2011-11-22T15:38:43 :D 2011-11-22T15:39:34 You are a master of the keyboard 2011-11-22T15:42:39 *** praveen has quit IRC (Quit: Page closed) 2011-11-22T15:44:53 Fluxid: well, you just need to port to python2 - shouldn't be that hard 2011-11-22T15:45:10 or give them 60k dollars and they'll code py3 support :) 2011-11-22T15:45:49 i hope im gonna make that much in a year in the future 2011-11-22T15:46:25 I should farm my bot out to topcoder 2011-11-22T15:46:43 farm out? 2011-11-22T15:46:57 ah i see 2011-11-22T15:47:05 make them write it for you? 2011-11-22T15:49:52 *** delt0r_ has quit IRC (Ping timeout: 240 seconds) 2011-11-22T15:51:56 not a bad idea 2011-11-22T15:53:54 *** amstan has joined #aichallenge 2011-11-22T15:53:54 *** ChanServ sets mode: +o amstan 2011-11-22T15:56:26 *** ltriant has joined #aichallenge 2011-11-22T15:57:01 *** onion42 has quit IRC (Ping timeout: 265 seconds) 2011-11-22T16:02:14 *** delt0r_ has joined #aichallenge 2011-11-22T16:03:27 epic first game with all starter packages 2011-11-22T16:07:41 at least you've won .. 2011-11-22T16:10:06 headbanging being pretty popular among starters 2011-11-22T16:14:14 i managed to slow down my bot 2011-11-22T16:14:23 *** amstan has quit IRC (Ping timeout: 248 seconds) 2011-11-22T16:14:24 at least i wont get any tickets 2011-11-22T16:16:13 *** amstan has joined #aichallenge 2011-11-22T16:16:13 *** ChanServ sets mode: +o amstan 2011-11-22T16:21:30 *** amstan has quit IRC (Remote host closed the connection) 2011-11-22T16:21:45 mcstar, in berlin, currently, you're much closer to get a ticket for wrong parking, than for speeding.. 2011-11-22T16:22:06 thestinger: i've already writenn stuff in C so it's too late 2011-11-22T16:22:16 *** amstan has joined #aichallenge 2011-11-22T16:22:16 *** ChanServ sets mode: +o amstan 2011-11-22T16:22:22 that must suck, but parking is horrible in bufapest too, i heard 2011-11-22T16:27:16 mcstar, all i'm saying is, if you slow down your attack front, you'll just stuff a tight maze for all those others pushing to the front 2011-11-22T16:33:56 *** Palmik has quit IRC (Remote host closed the connection) 2011-11-22T16:39:07 *** kilae has quit IRC (Quit: ChatZilla 0.9.87 [Firefox 8.0/20111104165243]) 2011-11-22T16:40:33 g0llum: by slowed it down i meant now it takes more time to complete a turn 2011-11-22T16:40:59 ok, ok ;) 2011-11-22T16:44:12 *** Israfel has joined #aichallenge 2011-11-22T16:44:36 I really need to get started on my bot again 2011-11-22T16:47:28 But c++ is so strange and mysterious 2011-11-22T16:49:01 *** Lithosphere has quit IRC (Remote host closed the connection) 2011-11-22T16:49:26 *** Lithosphere has joined #aichallenge 2011-11-22T16:49:26 *** Lithosphere has joined #aichallenge 2011-11-22T16:50:40 *** ikaros_ has joined #aichallenge 2011-11-22T17:00:02 *** g0llum has quit IRC (Read error: Connection reset by peer) 2011-11-22T17:00:32 the latest version of the visualizer ants.py takes a lonnng time at the end of the game 2011-11-22T17:00:35 after text got added 2011-11-22T17:00:44 ohhh I forgot I am putting out some text 2011-11-22T17:01:24 *** Antimony has joined #aichallenge 2011-11-22T17:04:37 *** amstan has quit IRC (Ping timeout: 245 seconds) 2011-11-22T17:18:16 *** twymer has quit IRC (Ping timeout: 244 seconds) 2011-11-22T17:19:28 *** epicmonkey has quit IRC (Ping timeout: 240 seconds) 2011-11-22T17:20:53 *** Mystret has quit IRC (Quit: Page closed) 2011-11-22T17:21:02 *** foRei has quit IRC (Read error: Connection reset by peer) 2011-11-22T17:24:50 *** Marce_ has quit IRC (Quit: Page closed) 2011-11-22T17:29:00 *** rajanaresh has joined #aichallenge 2011-11-22T17:32:10 my bot is getting worse and i haven't touched it 2011-11-22T17:34:40 *** speakeasy has quit IRC (Ping timeout: 240 seconds) 2011-11-22T17:35:53 or the others are getting better :) 2011-11-22T17:37:23 *** Fandekasp has quit IRC (Ping timeout: 258 seconds) 2011-11-22T17:39:32 Did you think others would stay still :) 2011-11-22T17:42:32 *** Jak_o_Shadows has joined #aichallenge 2011-11-22T17:43:26 *** ikaros_ has quit IRC (Quit: Ex-Chat) 2011-11-22T17:48:38 maybe your bot is reaching maximum entropy 2011-11-22T18:03:47 I'm just making my code cleaner atm... I think I'm going to be using the C++11 lambdas a lot 2011-11-22T18:06:09 I wish I could use lambdas 2011-11-22T18:06:50 labda 2011-11-22T18:07:01 =ball 2011-11-22T18:07:04 *** amstan has joined #aichallenge 2011-11-22T18:07:04 *** ChanServ sets mode: +o amstan 2011-11-22T18:07:31 gone from ~1500 lines to 1300 in the past 15 mins 2011-11-22T18:07:53 good for you, im going in the opposite direction 2011-11-22T18:08:24 and I went through all my code and added const to every non-variable variable just for the hell of it - it's sort of like ugly haskell now 2011-11-22T18:08:25 i added ~200 lines today 2011-11-22T18:08:32 >2600 2011-11-22T18:08:44 :) 2011-11-22T18:09:07 i read f# to relax a little bit 2011-11-22T18:09:15 im not sold on it yet 2011-11-22T18:10:30 meh, it's aimed at C# devs 2011-11-22T18:10:40 *** bhasker has quit IRC (Ping timeout: 240 seconds) 2011-11-22T18:12:07 clojure looks really nice 2011-11-22T18:12:13 I haven't tried it yet 2011-11-22T18:12:17 *** bhasker has joined #aichallenge 2011-11-22T18:12:29 *** Rav3nsW0rd has joined #aichallenge 2011-11-22T18:13:26 i tried it out a bit 2011-11-22T18:13:34 set it up, did some basic stuff 2011-11-22T18:14:26 *** Anilm3 has joined #aichallenge 2011-11-22T18:14:42 Hi guys 2011-11-22T18:14:47 hey 2011-11-22T18:15:39 hi 2011-11-22T18:18:48 hello 2011-11-22T18:21:53 *** xathis has quit IRC () 2011-11-22T18:22:33 ok we can talk freely now 2011-11-22T18:27:09 *** Harpyon has quit IRC (Quit: Textual IRC Client: http://www.textualapp.com/) 2011-11-22T18:30:48 *** grwip has quit IRC (Quit: Leaving) 2011-11-22T18:32:19 *** cyphase has joined #aichallenge 2011-11-22T18:39:52 *** ikaros has quit IRC (Quit: Ex-Chat) 2011-11-22T18:40:30 *** Antimony has quit IRC (Ping timeout: 252 seconds) 2011-11-22T18:43:16 *** eccentric has quit IRC (Remote host closed the connection) 2011-11-22T18:47:27 *** iglo has quit IRC (Remote host closed the connection) 2011-11-22T18:59:35 *** Anilm3 has quit IRC (Quit: Lost terminal) 2011-11-22T19:01:47 the engine or playgame.py should handle ^C and END the game, not quit 2011-11-22T19:02:08 * avdg wonders if we spoke in silence for 30 min 2011-11-22T19:05:52 *** Antvolution has left #aichallenge 2011-11-22T19:09:22 can somebody explain me scenarios? 2011-11-22T19:09:36 i just edit a mapfile, run it and thats all? 2011-11-22T19:09:58 use --scenario when you run play_game.py 2011-11-22T19:10:05 no _ 2011-11-22T19:10:30 ok,but do i have to leave hills in for example? 2011-11-22T19:11:15 I dunno, I've just been adding food (*), and ants (a, b, c, etc.) and then running it 2011-11-22T19:11:59 do i have to provide bots for all players? 2011-11-22T19:12:08 or are there static ants? 2011-11-22T19:12:35 well, you can make a hill A and then put a ants, which belong to that player 2011-11-22T19:13:00 ok, but i gonna need a holdbot for that 2011-11-22T19:14:43 thestinger: i see numbers 2011-11-22T19:14:46 not letters 2011-11-22T19:15:38 replace them with letters 2011-11-22T19:15:44 0 -> A etc. 2011-11-22T19:16:14 that way the starting locations aren't random 2011-11-22T19:16:25 well, I dunno if that's really what it does 2011-11-22T19:16:32 but that's how the tutorial map scenario does it 2011-11-22T19:17:53 thx 2011-11-22T19:18:43 but this sucks 2011-11-22T19:19:00 why? 2011-11-22T19:19:00 i cant call playgame.py from the current directory 2011-11-22T19:19:16 it needs to be called where it is, cause needs the other files 2011-11-22T19:19:19 from* 2011-11-22T19:20:12 i think im gonna need to add that dir to the python path 2011-11-22T19:20:28 are you sure? 2011-11-22T19:20:33 calling it from a different directory works for me 2011-11-22T19:20:39 python2 tools/playgame.py ./MyBot "python LazyBot.py" --map_file scenario.map --log_dir game_logs --player_seed 7 --verbose -e $(options) --turns 100 --food none --scenario -E 2011-11-22T19:20:40 really? 2011-11-22T19:20:54 but the bots need to be in the directory I call it from or the sandboxing stuff freaks out 2011-11-22T19:21:05 ../playgame.py complains that it doesnt see the engine 2011-11-22T19:22:26 thestinger: i think engine.py is in the directory you are calling playgame from 2011-11-22T19:22:32 no 2011-11-22T19:22:44 'tools' is in the directory 2011-11-22T19:22:52 look at the command I pasted 2011-11-22T19:23:00 im not crazy 2011-11-22T19:23:11 neither am I :P 2011-11-22T19:23:19 maybe it doesn't work if you're deeper in the directory tree 2011-11-22T19:23:22 but I'm higher up 2011-11-22T19:23:23 i cant call playgame.py from anywhere else except from where it is 2011-11-22T19:23:31 tried that 2011-11-22T19:23:37 ants/playgame.py same error 2011-11-22T19:23:49 did you try 'python2 ants/playgame.py'? 2011-11-22T19:23:55 why? 2011-11-22T19:24:02 it calls python2 2011-11-22T19:24:02 dunno, for some reason I'm doing it that way 2011-11-22T19:24:29 *** Lithosphere has quit IRC (Ping timeout: 244 seconds) 2011-11-22T19:24:31 same 2011-11-22T19:24:54 i tried the tools version 2011-11-22T19:24:58 its working with that 2011-11-22T19:25:07 the github's structure is different 2011-11-22T19:25:23 i see 2011-11-22T19:25:53 in the tools's version playgame.py and engine.py is in the same directory 2011-11-22T19:26:10 thats why it can find it regardless from where i call playgame.py from 2011-11-22T19:26:24 but in the github's version they are totally separated 2011-11-22T19:26:46 playgame.py is in ./ants 2011-11-22T19:26:56 engine.py is in ./worker 2011-11-22T19:28:40 *** [1]analyst74 <[1]analyst74!~analyst74@S0106c84c752ced49.ed.shawcable.net> has joined #aichallenge 2011-11-22T19:29:29 *** HaraKiri has quit IRC () 2011-11-22T19:30:10 *** [2]analyst74 <[2]analyst74!~analyst74@S0106c84c752ced49.ed.shawcable.net> has joined #aichallenge 2011-11-22T19:31:04 Exception: ('Invalid map', 'This map is not symmetric. Player 1 does not have an orientation that matches player 0') 2011-11-22T19:31:39 amstan: what are the restrictions on scenarios? 2011-11-22T19:31:49 *** analyst74 has quit IRC (Ping timeout: 240 seconds) 2011-11-22T19:31:49 *** [2]analyst74 is now known as analyst74 2011-11-22T19:31:58 mcstar: not sure, i think that's it 2011-11-22T19:31:59 *** choas has quit IRC (Ping timeout: 244 seconds) 2011-11-22T19:32:05 you can try removing it 2011-11-22T19:32:08 browse around the code 2011-11-22T19:32:48 for scenarios it might be helpful to be able to disregard hills 2011-11-22T19:33:04 *** [1]analyst74 <[1]analyst74!~analyst74@S0106c84c752ced49.ed.shawcable.net> has quit IRC (Ping timeout: 240 seconds) 2011-11-22T19:33:38 *** fpcfan has quit IRC (Ping timeout: 244 seconds) 2011-11-22T19:34:42 *** JamesMG has quit IRC (Quit: leaving) 2011-11-22T19:34:50 *** JamesMG has joined #aichallenge 2011-11-22T19:35:08 *** fpcfan has joined #aichallenge 2011-11-22T19:35:39 *** Antimony has joined #aichallenge 2011-11-22T19:36:16 amstan: do you have some idea from where that error originates? 2011-11-22T19:36:30 mcstar: search will probably help 2011-11-22T19:36:34 i tried searching engine.py but found no trace of it 2011-11-22T19:36:47 engine.py is supposed to be game agnostic 2011-11-22T19:36:50 it's in ants.py 2011-11-22T19:36:56 oh 2011-11-22T19:37:10 *** rajanaresh has quit IRC (Ping timeout: 260 seconds) 2011-11-22T19:37:15 i dont see any imports 2011-11-22T19:37:31 if you're in linux 2011-11-22T19:37:34 cd tools/ 2011-11-22T19:37:44 grep -R "map is not symmetric" . 2011-11-22T19:37:57 brb 2011-11-22T19:37:58 amstan: its me, remember? 2011-11-22T19:38:02 k 2011-11-22T19:38:13 well.. i forgot, lol 2011-11-22T19:39:39 *** tobym has quit IRC (Remote host closed the connection) 2011-11-22T19:39:41 *** amstan_ has joined #aichallenge 2011-11-22T19:39:41 *** ChanServ sets mode: +o amstan_ 2011-11-22T19:40:00 *** Lithosphere has joined #aichallenge 2011-11-22T19:40:00 *** Lithosphere has joined #aichallenge 2011-11-22T19:47:24 *** cyphase has quit IRC (Read error: Connection reset by peer) 2011-11-22T19:48:56 *** pairofdice has quit IRC (Read error: Connection reset by peer) 2011-11-22T19:50:40 so whats the point of this scenario thing if it aint working? 2011-11-22T19:51:09 and i cant just disable symmetry checks, the whole thing breaks down 2011-11-22T19:51:15 not that it shouldnt 2011-11-22T19:51:32 but either im missing something or this is useless 2011-11-22T19:52:03 it works for me, but I haven't moved around hills 2011-11-22T19:52:13 I've just added ants/food 2011-11-22T19:52:27 thestinger: i cant add ants cause it breaks symmetry 2011-11-22T19:52:38 it lets me do that :\ 2011-11-22T19:52:44 anywhere? 2011-11-22T19:53:15 http://paste.pocoo.org/show/511693/ 2011-11-22T19:53:23 that's one of the many working scenarios I have 2011-11-22T19:53:34 I haven't run into any symmetry errors 2011-11-22T19:54:00 weird 2011-11-22T19:54:03 ill try that map 2011-11-22T19:54:21 i will call it stingersmap.map ok? 2011-11-22T19:54:30 yeah :) 2011-11-22T19:55:06 Exception: ('Invalid map', 'This map is not symmetric. Player 1 does not have an orientation that matches player 0') 2011-11-22T19:55:33 and i just pulled the repo some minutes ago 2011-11-22T19:56:03 maybe there are some conflicting options 2011-11-22T19:56:36 maybe i need --food none ? 2011-11-22T19:57:02 f me hard 2011-11-22T19:57:04 thats it 2011-11-22T19:57:12 yeah 2011-11-22T19:57:22 =] 2011-11-22T19:57:24 thestinger: thanks 2011-11-22T19:57:35 i was just goibg to point that out. hi 2011-11-22T19:58:57 hi 2011-11-22T19:59:25 *** fpcfan has quit IRC (Ping timeout: 240 seconds) 2011-11-22T19:59:34 yeah was about to say it myself 2011-11-22T19:59:36 hmm, I wonder if a vector of object (and not of pointers) is a bad idea in c++ (until I overlook something) 2011-11-22T19:59:57 no 2011-11-22T20:00:03 even better in c++11 2011-11-22T20:00:15 my compiler isn't happy atm 2011-11-22T20:00:16 i read up on this, and its totally ok to return anything 2011-11-22T20:00:26 i.e. vector of things 2011-11-22T20:00:37 the move constructor will be called 2011-11-22T20:01:13 avdg: whats the error/problem? 2011-11-22T20:01:18 aVector.push_back(new Location(x, y)) 2011-11-22T20:01:28 thats an address 2011-11-22T20:01:43 new something is an address, yo need a pointer to store it 2011-11-22T20:01:49 hmm, so how do I pass the whole object? 2011-11-22T20:01:53 ? 2011-11-22T20:02:08 *new Location() 2011-11-22T20:02:16 but best to omit it lol 2011-11-22T20:02:21 location() 2011-11-22T20:02:27 * avdg looks at header file 2011-11-22T20:02:52 if the elements are references you could do *new 2011-11-22T20:03:00 but i advise against it 2011-11-22T20:03:23 *** cyphase has joined #aichallenge 2011-11-22T20:03:29 uh, just push_back(Location(x,y)) 2011-11-22T20:03:32 the vector is of type std::vector 2011-11-22T20:03:48 yep, do it as we said 2011-11-22T20:03:50 so I think that would be the problem 2011-11-22T20:04:09 hmm, why am I so not following the discussion 2011-11-22T20:04:28 std::vector mylocvector; 2011-11-22T20:04:43 yeah, its like that atm 2011-11-22T20:04:44 mylocvector.push_back(Location(row, col)); 2011-11-22T20:04:52 ah, omit the new 2011-11-22T20:04:56 yes 2011-11-22T20:05:17 ty 2011-11-22T20:05:39 *** Chris_0076 has quit IRC (Read error: Connection reset by peer) 2011-11-22T20:05:59 *** Chris_0076 has joined #aichallenge 2011-11-22T20:06:50 hah, its quite easy to edit maps with vim 2011-11-22T20:06:56 :-) you made my compiler happy 2011-11-22T20:07:19 hmm, visual mode? :-) 2011-11-22T20:07:21 im glad 2011-11-22T20:07:25 yes 2011-11-22T20:07:44 i spent more time in emacs, but vim has its merits 2011-11-22T20:07:45 there is even a vimcast tutorial about that 2011-11-22T20:08:01 i manly use vim because it loads faster 2011-11-22T20:08:08 my emacs config is pretty long 2011-11-22T20:08:20 and the colorthemes slow it down considerably 2011-11-22T20:08:24 http://vimcasts.org/episodes/creating-the-vimcasts-logo-as-ascii-art/ 2011-11-22T20:10:19 *** fpcfan has joined #aichallenge 2011-11-22T20:13:47 actaully, don't even do vec.push_back(Location(row, col)) 2011-11-22T20:13:50 actually* 2011-11-22T20:14:00 use vec.emplace_back(row, col) 2011-11-22T20:14:22 hmm, I wonder what that does 2011-11-22T20:14:31 * avdg googles 2011-11-22T20:14:34 it guarantees that it doesn't construct it then copy it 2011-11-22T20:14:44 .emplace_back(location(row,col)) 2011-11-22T20:14:58 no? 2011-11-22T20:15:12 .emplace_back() passes the arguments to the constructor 2011-11-22T20:15:28 hm 2011-11-22T20:15:40 .push_back() will make a copy (usually) 2011-11-22T20:15:46 interesting, i read about emplace but i thouhgt you had to use the same way 2011-11-22T20:15:48 *** Garf has quit IRC (Ping timeout: 276 seconds) 2011-11-22T20:16:21 ofc the compiler can optimize push_back, but I tested it a bit and it doesn't look like gcc is very good at optimizing that without your help 2011-11-22T20:16:31 *** Antimony has quit IRC (Ping timeout: 248 seconds) 2011-11-22T20:16:47 but emplace is c++11 only 2011-11-22T20:16:56 yeah 2011-11-22T20:17:04 I hope its build in in gcc already 2011-11-22T20:17:06 so they added that + move? 2011-11-22T20:17:14 *** FlyinFish has joined #aichallenge 2011-11-22T20:17:20 :/ 2011-11-22T20:17:22 nope 2011-11-22T20:17:27 avdg: it is 2011-11-22T20:17:32 compile with -std=c++0x 2011-11-22T20:17:35 at least for the mac compiler, which is 3 years old 2011-11-22T20:17:52 OSX uses an ancient gcc because they're scared of GPLv3 2011-11-22T20:17:57 --version? 2011-11-22T20:18:02 just download a new version, the server uses 4.5 2011-11-22T20:18:03 4.2.1 2011-11-22T20:18:12 luckily I have a server 2011-11-22T20:18:30 i used macports when i had a mac 2011-11-22T20:18:35 or similar 2011-11-22T20:18:39 i dont remember its name 2011-11-22T20:18:48 there was a port commnd 2011-11-22T20:18:55 C++11 has so many nice things, and gcc/libstdc++ support almost all of it now 2011-11-22T20:18:56 well, I think its better to test it on an ubuntu server anyway 2011-11-22T20:19:08 since the server is running on linux as well 2011-11-22T20:20:08 thestinger: what can c++ copy-contruct? 2011-11-22T20:20:11 clang/libc++ support a lot of c++11 too, if you have v3 (which is rc2 or something now, not released) 2011-11-22T20:20:17 with the default copy-constructor 2011-11-22T20:20:22 *** analyst74 has quit IRC (Quit: HydraIRC -> http://www.hydrairc.com <- *I* use it, so it must be good!) 2011-11-22T20:20:31 lets say i have a complex class and i dont provide one 2011-11-22T20:20:47 when i copy it like when adding to a vector do i get an incomlete obkect? 2011-11-22T20:20:49 j 2011-11-22T20:21:41 if you don't use manual memory allocation and pointers in your classes/structs, I think you'll be fine no matter what 2011-11-22T20:21:48 *** FlyinFish is now known as analyst74 2011-11-22T20:22:05 thats what im asking 2011-11-22T20:22:16 so i get no error whatsoever 2011-11-22T20:22:24 but im gonna take care of that manually 2011-11-22T20:22:34 i mean write one for the class 2011-11-22T20:22:47 ah, well I think it will just copy the pointer 2011-11-22T20:22:54 is it enough to provide operator= ? 2011-11-22T20:22:56 so it will point to the same block of memory as the old object 2011-11-22T20:23:13 not sure, I'm new to C++ too :) 2011-11-22T20:23:17 oh 2011-11-22T20:23:28 you sounded like you were the master of it 2011-11-22T20:23:33 how new? 2011-11-22T20:23:52 probably as new as you are 2011-11-22T20:24:14 well, together we make a half-decent c++-er 2011-11-22T20:24:23 I just learned it for this contest 2011-11-22T20:24:29 me too 2011-11-22T20:24:38 well, not FOR the contest 2011-11-22T20:24:43 but while doing it 2011-11-22T20:24:49 yeah, that's what I meant 2011-11-22T20:24:51 but i used c before 2011-11-22T20:25:01 I have too, so learning C++ was easy 2011-11-22T20:25:09 it's just the weird subtle things that are tricky 2011-11-22T20:25:28 yep 2011-11-22T20:25:36 and im teaching my friend too 2011-11-22T20:25:44 he was brand new to programming 2011-11-22T20:25:56 nice 2011-11-22T20:26:04 he figure he needed some actual knowledge, since he put that into his cv 2011-11-22T20:26:05 *** Garf has joined #aichallenge 2011-11-22T20:26:10 figured* 2011-11-22T20:26:39 good work, thestinger, http://ants.fluxid.pl/replay.11208 2011-11-22T20:26:59 analyst74: thanks :) 2011-11-22T20:27:07 oh well, I just have to find out a way to fix my wrong assumptions with c++, but otherwise, yeah, c++ is quite simple 2011-11-22T20:27:23 at least, if I don't look at the problems of c++ 2011-11-22T20:28:14 i just read today about namespace pitfalls 2011-11-22T20:28:28 argument dependent name resolution, etc.? 2011-11-22T20:28:50 yes 2011-11-22T20:29:05 adl 2011-11-22T20:29:14 argument dependent lookup? 2011-11-22T20:29:25 yeah 2011-11-22T20:29:46 that's one of the causes of the horrible compiler errors 2011-11-22T20:30:04 i believe you sensei 2011-11-22T20:30:16 and the way C++ does overloading leads to those horrible errors 2011-11-22T20:30:28 it just keeps looking for a working overload 2011-11-22T20:31:05 clang has much saner errors but it doesn't compile my code anymore since the C++11 support is way behind gcc 2011-11-22T20:31:12 *** bmh has joined #aichallenge 2011-11-22T20:32:13 well, I think if I install the 3.0 release candidate it might be able to compile it again 2011-11-22T20:32:38 2.9 can't handle std::unordered_map, std::array, std::unordered_set, etc. 2011-11-22T20:33:04 why bother? 2011-11-22T20:33:25 well, I use it for autocompletion in vim 2011-11-22T20:33:44 well, kdevelop deep-parses my code 2011-11-22T20:33:48 and it has really nice errors/warnings and static analysis 2011-11-22T20:33:55 it lets me know about everyhting 2011-11-22T20:33:58 the g++ errors are ridiculous sometimes 2011-11-22T20:34:40 well, i compile often, so i always now where the error is 2011-11-22T20:35:00 yeah 2011-11-22T20:35:02 and i usually find it quickly except when im really tired 2011-11-22T20:35:34 the ridiculous errors have just annoyed me after merging in a branch 2011-11-22T20:35:52 because it's tricky to figure out what the hell is wrong when I didn't just code it 2011-11-22T20:36:24 what is your main language? 2011-11-22T20:36:30 are you a progessional? 2011-11-22T20:36:32 f 2011-11-22T20:36:44 no, not yet (I'm 19) 2011-11-22T20:36:53 python is the language I know really well 2011-11-22T20:37:11 *** antonh has quit IRC (Ping timeout: 244 seconds) 2011-11-22T20:38:00 attending university then? 2011-11-22T20:38:15 I will be soon, taking some time off for personal reasons 2011-11-22T20:38:43 *** Antimony has joined #aichallenge 2011-11-22T20:39:33 *** antonh has joined #aichallenge 2011-11-22T20:40:38 since i dont want to see the sun rise, im going to bed now 2011-11-22T20:40:42 *** mcstar has quit IRC (Quit: WeeChat 0.3.6) 2011-11-22T20:41:13 *** bmh has quit IRC (Ping timeout: 265 seconds) 2011-11-22T20:41:49 *** treeform has quit IRC (Remote host closed the connection) 2011-11-22T20:41:55 hehe 2011-11-22T20:42:00 I know that feeling 2011-11-22T20:42:26 should turn in myself :/ 2011-11-22T20:42:37 good examples :) 2011-11-22T20:42:51 i hate that feeling 2011-11-22T20:42:58 it's like when you see the sun, game over 2011-11-22T20:43:02 no point in sleeping anymore 2011-11-22T20:43:13 haha 2011-11-22T20:43:24 yeah when the sky turns lighter in the distance you already know you're in for a rough day ;) 2011-11-22T20:43:36 although I can normally still catch a few hours of sleep at that point. 2011-11-22T20:43:45 but by the time the people are walking in the street again ... 2011-11-22T20:49:04 *** amstan_ has quit IRC (Ping timeout: 240 seconds) 2011-11-22T21:29:48 *** JorgeB has quit IRC (Quit: Textual IRC Client: http://www.textualapp.com/) 2011-11-22T21:31:18 *** zzz has joined #aichallenge 2011-11-22T21:34:03 http://ants.fluxid.pl/replay.11374 lol. 2011-11-22T21:34:37 my bots are cowards now 2011-11-22T21:35:15 *** rofer has quit IRC (Ping timeout: 260 seconds) 2011-11-22T21:38:28 nice maginot line there 2011-11-22T21:48:26 *** Jak_o_Shadows has quit IRC (Remote host closed the connection) 2011-11-22T21:51:38 *** bhasker has quit IRC (Quit: bhasker) 2011-11-22T21:52:37 *** Redgis has quit IRC (Ping timeout: 244 seconds) 2011-11-22T21:54:29 *** rofer has joined #aichallenge 2011-11-22T21:56:02 *** rajanaresh has joined #aichallenge 2011-11-22T21:57:32 *** Antimony has quit IRC (Ping timeout: 245 seconds) 2011-11-22T21:58:03 *** Antimony has joined #aichallenge 2011-11-22T21:59:44 *** modafinil is now known as WORKSFORME 2011-11-22T22:00:07 I only see 2 islands :p 2011-11-22T22:02:26 *** Conorach has quit IRC (Ping timeout: 244 seconds) 2011-11-22T22:08:19 *** zzz has left #aichallenge 2011-11-22T22:10:45 *** TheLinker has joined #aichallenge 2011-11-22T22:12:02 *** AntDroid has joined #aichallenge 2011-11-22T22:20:58 *** hl has joined #aichallenge 2011-11-22T22:21:29 *** hl has left #aichallenge 2011-11-22T22:24:48 *** thestinger has quit IRC (Read error: Operation timed out) 2011-11-22T22:25:10 *** thestinger has joined #aichallenge 2011-11-22T23:01:58 *** avdg has quit IRC (Quit: Leaving.) 2011-11-22T23:02:50 *** AntDroid has quit IRC (Ping timeout: 265 seconds) 2011-11-22T23:04:06 *** avdg has joined #aichallenge 2011-11-22T23:09:24 thestinger: there's a whole forum thread on that map being broken for basically that reason 2011-11-22T23:09:50 oh that's hillarious when your pile of ants backs up OVER YOUR HILL 2011-11-22T23:12:12 I think the rankings on the tcp server are broken again 2011-11-22T23:13:45 I never really saw them work 2011-11-22T23:14:50 *** TheLinker has quit IRC (Quit: Bye) 2011-11-22T23:15:22 my sigma has started going up on all my bots, and the mu just jumps around now 2011-11-22T23:22:31 *** JorgeB has joined #aichallenge 2011-11-22T23:34:49 *** Antimony has quit IRC (Ping timeout: 244 seconds) 2011-11-22T23:42:31 *** u_ has quit IRC (Quit: u_) 2011-11-22T23:45:44 time to implement a whole-history trueskill 2011-11-22T23:48:01 BenJackson: which thread? 2011-11-22T23:49:40 not sure if I can find it 2011-11-22T23:50:39 *** treeform has joined #aichallenge 2011-11-22T23:50:57 *** delt0r_ has quit IRC (Ping timeout: 276 seconds) 2011-11-22T23:52:01 a whole part of the forum seems to be missing 2011-11-22T23:52:06 the "tools" board