2010-10-24T00:02:15 *** wh1teside has quit IRC (Ping timeout: 240 seconds) 2010-10-24T00:03:16 DB cursors aren't being closed in tournament manager 2010-10-24T00:04:38 Also everything about a game should be uploaded in a single transaction 2010-10-24T00:04:40 doesn't MySQLdb close them when they get gc'd though? 2010-10-24T00:05:00 *** McLeopold has quit IRC (Quit: Leaving) 2010-10-24T00:05:20 that would be good 2010-10-24T00:05:28 *** Titankiller has quit IRC (Read error: Connection reset by peer) 2010-10-24T00:06:10 *** Titankiller has joined #aichallenge 2010-10-24T00:06:11 I can't decide whether I should stop and fix, or just go ahead with the error reporting 2010-10-24T00:06:24 it gets hard doesn't it 2010-10-24T00:07:25 *** rebelxt_ has quit IRC (Quit: Page closed) 2010-10-24T00:07:59 *** davidjliu has quit IRC (Quit: Page closed) 2010-10-24T00:08:34 janzert: i never had to close them.. 2010-10-24T00:09:15 yeah, I think it's not a real problem as long as the cursor isn't hanging around for a long time 2010-10-24T00:09:23 which it won't in this case 2010-10-24T00:11:30 Top 10 players: bocsimacko(3962), Hazard(3941), felixcoto(3934), rsergio(3918), cfaftw(3868), davidjliu(3863), dmj111(3794), sin_sun(3779), jambachili(3763), ruilov(3727) 2010-10-24T00:12:15 http://mysql-python.sourceforge.net/MySQLdb.html 2010-10-24T00:12:30 If you are using server-side cursors, it is very important to close the cursor when you are done with it and before creating a new one. 2010-10-24T00:12:55 You might get away with waiting for GC, and you might not. 2010-10-24T00:13:06 there's a lot of things that the mysqldb implementation skips over 2010-10-24T00:13:10 such as the commits 2010-10-24T00:13:12 and cursors 2010-10-24T00:20:27 *** yasith has joined #aichallenge 2010-10-24T00:37:43 *** Utkarsh has quit IRC (Ping timeout: 255 seconds) 2010-10-24T00:38:25 *** Mathnerd314 has joined #aichallenge 2010-10-24T00:39:52 *** rebelxt_ has joined #aichallenge 2010-10-24T00:40:56 *** tapwater_ has joined #aichallenge 2010-10-24T00:41:37 I realized: on the last turn, you should always do nothing! 2010-10-24T00:43:38 *** tapwater has quit IRC (Ping timeout: 250 seconds) 2010-10-24T00:43:39 *** tapwater_ is now known as tapwater 2010-10-24T00:44:05 which means logically of course you should also do nothing on the turn previous to that... :P 2010-10-24T00:44:11 *** Utkarsh has joined #aichallenge 2010-10-24T00:44:22 indeed. 2010-10-24T00:44:25 *** hellman_ has joined #aichallenge 2010-10-24T00:44:33 *** hellman has quit IRC (Ping timeout: 252 seconds) 2010-10-24T00:44:40 so there are really only 198 turns of the game! 2010-10-24T00:45:00 well and since we know the last two turns should do nothing we can keep backing it up 2010-10-24T00:46:06 no... because you can take a planet with 0 population, losing growth ships, and gain 2*growth back 2010-10-24T00:46:46 so I'll have to revise: on turn 199, you can take neutral planets distance 1 away with population less than their growth 2010-10-24T00:46:48 well actually, you can check whether a move will payoff in time 2010-10-24T00:46:51 and it's not constant 2010-10-24T00:47:09 sorry if I wasn't obvious I was just trying to extend it 'logically' to absurdity 2010-10-24T00:47:17 but yes your point seems correct 2010-10-24T00:47:46 janzert: obviously, and whenever I notice that, I always take it literally :p 2010-10-24T00:48:14 *** iNtERrUpT has joined #aichallenge 2010-10-24T00:49:32 so, on turn 198, what are the possible moves? 2010-10-24T00:49:52 distance 2 planets or farther are pointless, as before 2010-10-24T00:49:59 anyone here worked with the cpython api? do you know how to use PyFile_FromFile? 2010-10-24T00:50:55 only minimally with the api and it's been a few years and I don't recall that part no :/ 2010-10-24T00:51:31 i can't figure out what the other parameters are used for 2010-10-24T00:51:53 i have the FILE* variable, but idk about others 2010-10-24T00:52:08 i set them to something kinda descriptive for now, but i can't figure out what the last one does 2010-10-24T00:52:12 docs seem limited 2010-10-24T00:52:46 yeah, I quickly found going to the source code itself was about the only way to actually work with the api 2010-10-24T00:53:00 not sure how much the docs have improved since then 2010-10-24T00:53:01 janzert: what source code? 2010-10-24T00:53:07 cpython source 2010-10-24T00:53:22 the only thing about that function in the docs is: Create a new PyFileObject from the already-open standard C file pointer, fp. The function close will be called when the file should be closed. Return NULL on failure. 2010-10-24T00:53:34 prototype: PyObject* PyFile_FromFile(FILE *fp, char *name, char *mode, int (*close)(FILE*)) 2010-10-24T00:53:46 what does int (*close)(FILE*) do?? 2010-10-24T00:53:47 lol 2010-10-24T00:54:12 :) looks like it's a function pointer to a function that is suppose to close the file 2010-10-24T00:54:27 hmm 2010-10-24T00:55:13 in other words a callback function 2010-10-24T00:55:45 janzert: can i make it do nothing? 2010-10-24T00:55:55 is it a good idea to put a NULL there? 2010-10-24T00:56:04 sure but you may leak your file descriptor then 2010-10-24T00:56:16 at least that's what I would guess 2010-10-24T00:56:23 that's fine, i'm just trying to tap into it, i'm not managing it 2010-10-24T00:56:27 not sure if it would handle NULL correctly or not 2010-10-24T00:56:38 go look at the source :) 2010-10-24T00:57:00 well.. what happens if you call a function pointed at NULL? 2010-10-24T00:57:07 segfault 2010-10-24T00:57:26 You now have two _totally untested_ patches for 199. I resisted the urge to rewrite the DB code, so I just added another statement to insert the errors. 2010-10-24T00:57:38 :P ok 2010-10-24T00:58:08 janzert: sigh.. if i put NULL it'll segfault, if python decides to close it for whatever reason and i try to write to it, segfault, give me a break, lol 2010-10-24T00:58:10 I gotta take a break here as soon as I get this fix I'm working on commited 2010-10-24T00:58:30 but then I'll try and take a look at it jkl__ 2010-10-24T00:58:50 hmm... I'm skipping over stuff. turn 199 is more complicated than just neutrals. 2010-10-24T00:59:09 amstan: :} 2010-10-24T00:59:19 All I did was port error handling from the cloud engine and port the SQL from api_record_game.php 2010-10-24T00:59:40 python might check for null and not try to call it of course, but the source is about the only way to check that out 2010-10-24T01:00:27 oh well 2010-10-24T01:00:35 if i get segfaults, i'll know why.. lol 2010-10-24T01:00:37 I emphasize the patches are untested. Since I cannot meaningfully test them I kept them to the absolute minimum required to fix 199. 2010-10-24T01:01:18 yep, I'll test them locally here 2010-10-24T01:05:07 *** jkl__ has quit IRC (Ping timeout: 265 seconds) 2010-10-24T01:08:11 *** rebelxt_ has quit IRC (Quit: Page closed) 2010-10-24T01:11:26 *** delt0r___ has joined #aichallenge 2010-10-24T01:11:30 Top 10 players: bocsimacko(3941), Hazard(3920), felixcoto(3913), rsergio(3896), cfaftw(3847), davidjliu(3841), dmj111(3773), sin_sun(3753), jambachili(3743), ruilov(3707) 2010-10-24T01:12:40 *** delt0r has quit IRC (Ping timeout: 250 seconds) 2010-10-24T01:20:50 *** hornairs has quit IRC (Remote host closed the connection) 2010-10-24T01:27:36 *** uriel has joined #aichallenge 2010-10-24T01:30:06 *** uriel has left #aichallenge 2010-10-24T01:38:10 *** rebelxt_ has joined #aichallenge 2010-10-24T01:40:30 *** hellman has joined #aichallenge 2010-10-24T01:40:57 *** rebelxt_ has quit IRC (Client Quit) 2010-10-24T01:41:54 *** hellman_ has quit IRC (Ping timeout: 240 seconds) 2010-10-24T01:43:24 *** Azrathud has joined #aichallenge 2010-10-24T01:47:28 *** edcba has quit IRC (Ping timeout: 276 seconds) 2010-10-24T01:52:07 *** hellman has quit IRC (Remote host closed the connection) 2010-10-24T01:57:13 *** edcba has joined #aichallenge 2010-10-24T02:07:36 *** Palmik has joined #aichallenge 2010-10-24T02:11:31 Top 10 players: bocsimacko(3947), Hazard(3925), felixcoto(3920), rsergio(3903), cfaftw(3863), davidjliu(3848), dmj111(3789), sin_sun(3772), jambachili(3748), sequoh(3711) 2010-10-24T02:19:17 *** iNtERrUpT has quit IRC (Remote host closed the connection) 2010-10-24T02:20:52 *** iNtERrUpT has joined #aichallenge 2010-10-24T02:21:32 *** Mathnerd314 has quit IRC (Quit: ChatZilla 0.9.86-rdmsoft [XULRunner 1.9.2.8/20100722155716]) 2010-10-24T02:23:32 *** seisatsu has quit IRC (Quit: Leaving) 2010-10-24T02:28:10 *** iNtERrUp_ has joined #aichallenge 2010-10-24T02:28:18 *** mega1 has quit IRC (Ping timeout: 265 seconds) 2010-10-24T02:29:05 *** Tobu has quit IRC (Ping timeout: 252 seconds) 2010-10-24T02:29:18 *** iNtERrUpT has quit IRC (Ping timeout: 240 seconds) 2010-10-24T02:32:27 *** seisatsu has joined #aichallenge 2010-10-24T02:32:53 *** seisatsu has quit IRC (Client Quit) 2010-10-24T02:40:16 *** Appleman1234 has quit IRC (Ping timeout: 240 seconds) 2010-10-24T02:45:25 *** amriedle has quit IRC (Quit: Lost terminal) 2010-10-24T02:56:15 *** Zalma has joined #aichallenge 2010-10-24T02:58:04 Hi.. anyone here who could help a newbie a bit. I'm not really familiar with object-oriented programming... 2010-10-24T02:59:33 for example in c++ starter package there is used p.NumShips()... is p integer what points what planet? 2010-10-24T03:00:12 Zalma: no, p is a planet object 2010-10-24T03:00:31 and numships is a function of that object 2010-10-24T03:00:31 Mmm.. mkay 2010-10-24T03:00:47 yea that is what I understood thou 2010-10-24T03:01:02 so.. if you have an integer, and you want the planet with that integer as the id.. 2010-10-24T03:01:04 hmm 2010-10-24T03:01:19 * amstan downloads the code 2010-10-24T03:01:54 There should be starter packages for idiots :P 2010-10-24T03:02:12 Thou one reason I decided to do this is to learn 2010-10-24T03:02:34 Zalma: well.. what are you trying to do? 2010-10-24T03:03:02 Well for first I'm trying to understand how these objects work so I could make some calculations.. 2010-10-24T03:03:20 so.. you have the Planet object 2010-10-24T03:03:41 but lets say I would like to get fleet amount in planet 2 to variable b... 2010-10-24T03:03:53 so.. 2010-10-24T03:04:00 what? 2010-10-24T03:04:06 meh, i need to get a piece of paper to scribble out my AI :/ 2010-10-24T03:04:06 you want to know how many ships are on planet 2? 2010-10-24T03:04:12 yes 2010-10-24T03:05:07 Zalma: define planet 2 though 2010-10-24T03:05:14 hold on 2010-10-24T03:05:18 let's just go to basics 2010-10-24T03:05:22 you have a planet object 2010-10-24T03:05:29 I mean planet with ID 2 2010-10-24T03:05:30 let p be that object 2010-10-24T03:05:35 this represents just one planet 2010-10-24T03:05:49 you can do p.PlanetID() to get its ID 2010-10-24T03:06:01 p.Owner(), p.NumShips() 2010-10-24T03:06:24 once you have that p, you can find any piece of detail about it 2010-10-24T03:06:28 now.. you need p with the id 2 2010-10-24T03:07:17 Mkay 2010-10-24T03:07:45 then you have this planetwars object 2010-10-24T03:07:49 you only have one of those.. 2010-10-24T03:07:59 the instance is called pw 2010-10-24T03:08:14 so. pw.Planets() returns you a list of planets, a list of those planet objects 2010-10-24T03:08:27 you can iterate through them, check their id, check their size 2010-10-24T03:08:28 and all that 2010-10-24T03:08:52 Zalma: look at PlanetWars.h, it's the prototypes for all these objects and some extensive documentation 2010-10-24T03:09:39 The thing is I'm trying to do planet maps on my own without using much those objects at all. Getting all information I need for arrays and no need to call for functions 2010-10-24T03:10:11 Zalma: ideally you should use those objects 2010-10-24T03:10:19 Zalma: it's poor form to do your own thing.. 2010-10-24T03:10:31 Zalma: if you really want, you could write your own IO library, in C 2010-10-24T03:10:41 Zalma: and have it manage the planets as you want 2010-10-24T03:10:53 The thing I chose C++ is that you don't need to use objects :/ 2010-10-24T03:11:17 c++ is object oriented.. 2010-10-24T03:11:28 C is what you're looking for if you don't want objects 2010-10-24T03:11:31 Top 10 players: bocsimacko(3949), felixcoto(3915), Hazard(3895), rsergio(3867), cfaftw(3835), davidjliu(3817), dmj111(3782), sin_sun(3761), jambachili(3742), ruilov(3730) 2010-10-24T03:11:36 however, i don't think we have a c starter package 2010-10-24T03:11:37 well C++ is also functional language 2010-10-24T03:11:50 or any non object oriented starter package for that matter 2010-10-24T03:12:04 Zalma: yes, but the started package is very object oriented 2010-10-24T03:12:13 Yea I know.. 2010-10-24T03:12:22 imperative, you mean, not functional 2010-10-24T03:12:27 functional is a whole different class 2010-10-24T03:13:18 what's the worst that can happen if i have a open("/tmp/%s.ogz" % (name)), where name is an unsanitized string from the user? 2010-10-24T03:13:53 um... 2010-10-24T03:13:57 Problem is I have whole bunch of ideas what to program.. but no skill to implement them =( 2010-10-24T03:14:05 *** tapwater has quit IRC (Quit: tapwater) 2010-10-24T03:14:16 i think it'll just fail on trying to open a ridiculous filename 2010-10-24T03:14:37 Zannick: you can have name=../etc/passwd 2010-10-24T03:14:42 but it'll still append .ogz 2010-10-24T03:15:11 you can include a null in your string 2010-10-24T03:15:18 oh, i was thinking more if it could lead to arbitrary code 2010-10-24T03:15:33 since that looks like python it can depending on the origin 2010-10-24T03:15:51 janzert: irc, or c string 2010-10-24T03:16:02 if there's a null in name i don't know 2010-10-24T03:16:06 Hooooooooooowdydo 2010-10-24T03:16:09 well.. anyway, i don't intend to leave it like that 2010-10-24T03:16:12 or, good morning 2010-10-24T03:16:15 i just want to know if i'm safe till tomorrow 2010-10-24T03:16:15 i don't think it'll be arbitrary code execution 2010-10-24T03:16:28 the underlying os open call will stop reading the name at the null I'm pretty sure 2010-10-24T03:16:41 if so can open an arbitrary file then 2010-10-24T03:17:07 well, would the null be inserted? 2010-10-24T03:17:09 quickly sanitise it by removing all ".." 2010-10-24T03:17:21 if name is "123\0456" would it not open "123.ogz"? 2010-10-24T03:17:35 iow would python stop at the null? 2010-10-24T03:17:40 nope 2010-10-24T03:17:44 Zannick: how do you insert \0 on irc though? 2010-10-24T03:17:44 hm 2010-10-24T03:17:57 since though c string you clearly can't 2010-10-24T03:18:07 on irc? 2010-10-24T03:18:15 yeah 2010-10-24T03:18:18 i don't know what you mean 2010-10-24T03:18:28 Zannick: you know.. this thing we're talking on right now 2010-10-24T03:18:31 the string is coming from irc chat I assume 2010-10-24T03:18:38 janzert: yes 2010-10-24T03:18:41 oh, hm. 2010-10-24T03:18:51 in a unicode character? 2010-10-24T03:18:53 i wouldn't trust that it couldn't be done 2010-10-24T03:18:59 i think it depends on the irc client and server 2010-10-24T03:19:10 quakenet/freenode 2010-10-24T03:19:12 *** whereby has joined #aichallenge 2010-10-24T03:19:16 client is twisted irc 2010-10-24T03:19:20 yeah, it would depend on a lot of specifics 2010-10-24T03:19:49 yep -- you'd probably have ot have a hacked client or direct protocol manipulation 2010-10-24T03:19:52 to make it possible 2010-10-24T03:20:16 just simply replace instances of ".." with " " 2010-10-24T03:20:18 or something 2010-10-24T03:20:34 that would make it impossible to access parent directories 2010-10-24T03:20:54 http://stackoverflow.com/questions/295135/turn-a-string-into-a-valid-filename-in-python 2010-10-24T03:20:58 Does this add list of player owned planets to vector: std::vector my_planets = pw.MyPlanets(); 2010-10-24T03:21:21 TypeError: file() argument 1 must be encoded string without NULL bytes, not str 2010-10-24T03:21:22 *** seisatsu has joined #aichallenge 2010-10-24T03:21:24 no really stand out answers there though 2010-10-24T03:21:26 Where my_planets[1] = first planet id, my_planets [2] = second planet id etc? 2010-10-24T03:21:41 so this is what i did: 2010-10-24T03:21:52 that was taken from starter package 2010-10-24T03:21:56 in a file 2010-10-24T03:22:24 s = "ab\0cd" 2010-10-24T03:22:26 ahh, so python is filtering it before sending it off to the os anyway 2010-10-24T03:22:37 "print s" gives abcd 2010-10-24T03:22:47 "print repr(s)" gives "ab\x00cd" 2010-10-24T03:23:09 and "with open("%s" % s, "w") as f:" raises the TypeError on the open 2010-10-24T03:24:45 Zalma: my_planets = pw.MyPlanets(); doesn't add anything to my_planets, it replaces it entirely with the results from pw.MyPlanets() 2010-10-24T03:25:07 Zalma: and the indices will be [0] through [n - 1], when you have n planets. 2010-10-24T03:29:57 pff 2010-10-24T03:30:11 i cant understand how the java starter pack works 2010-10-24T03:30:13 Yesterday I was 11 hours banging my head to wall with this 2010-10-24T03:30:36 and I'm not any smarter than then.. 2010-10-24T03:30:36 can somebody help me 2010-10-24T03:30:43 ? 2010-10-24T03:31:03 these objects make my head hurt 2010-10-24T03:31:53 *** iNtERrUp_ has quit IRC (Remote host closed the connection) 2010-10-24T03:32:25 specially I have no idea what kind of informations these objects hold.. how to define and use them 2010-10-24T03:35:03 *** hellman has joined #aichallenge 2010-10-24T03:36:01 well my question is this where dies it actually read the standard input ? 2010-10-24T03:36:09 does 2010-10-24T03:38:05 *** Appleman1234 has joined #aichallenge 2010-10-24T03:40:19 Learning about objects this way is kind of reverse engineering... 2010-10-24T03:43:25 If u don't mind to answer to stupid question again in p.NumShips() numships is class and p is instance of that class? 2010-10-24T03:44:16 p is the instance of a class (don't know what it's named the cpp package probable Planet) and NumShips is the class method 2010-10-24T03:44:58 Okies.. I guess I'm now on to something ;) 2010-10-24T03:45:22 you should be able to find the class definition showing what all it contains in the PlanetWars.h file 2010-10-24T03:45:48 I have next week meeting in work with few IT nerds.. maybe they can help me too if I don't figure this out :) 2010-10-24T03:46:17 err, s/definition/declaration 2010-10-24T03:47:45 its prolly this // Initializes a planet. Planet(int planet_id, etc 2010-10-24T03:49:45 line 73: class Planet { 2010-10-24T03:49:54 is the start of the declaration 2010-10-24T03:50:05 btw another thing that been wondering.. why is it p.Numships and not Planet.NumShips? =) 2010-10-24T03:50:17 like its declared.. 2010-10-24T03:50:18 but yes, I see where your line now that is the right area 2010-10-24T03:50:40 Planet is the class name not the instance of that class 2010-10-24T03:50:59 ah.. yes 2010-10-24T03:51:42 line 25 in MyBot.cc is assigning the instance in the my_planets vector to p 2010-10-24T03:52:05 the same thing is done on line 38 2010-10-24T03:52:58 btw, you might have an easier time picking up object oriented programming with java or python 2010-10-24T03:53:14 they're just a little easier to work with the C++ straight off 2010-10-24T03:53:26 than C++ that is 2010-10-24T03:53:37 How about C#? 2010-10-24T03:53:43 it's too late I can't type straight anymore :P 2010-10-24T03:54:13 I've never worked with C# but it's pretty certainly easier than c++ as well 2010-10-24T03:54:36 since I believe it's fairly similar to java 2010-10-24T03:55:02 one good thins in C++ u don't need to define for example arrays as objects too 2010-10-24T03:55:14 thats the reason I chose it.. 2010-10-24T03:55:48 with c++ u should be able to do program without any objects if I'm correct.. 2010-10-24T03:55:52 well yes C++ isn't OO only like java more or less is 2010-10-24T03:56:04 i use structs in c++ to simlify things a lot 2010-10-24T03:56:11 but i also have quite a few 4d vectors etc. 2010-10-24T03:56:56 All I need is to get information about planets to my arrays so I could start doing my bot 2010-10-24T03:57:23 and I'm not going to use any objects after that.. :P 2010-10-24T03:58:27 honestly if you can do a whole lot else in C++ or even just C the objects shouldn't be too hard to figure out 2010-10-24T03:58:51 just look at a tutorial or two on them from a web search 2010-10-24T03:59:05 Yea I've been reading a lot.. 2010-10-24T03:59:27 but whole consept of objects isn't familiar to me so its not that easy 2010-10-24T04:00:00 think of them like structs that have functions :) 2010-10-24T04:01:56 would u be so kind to write me a example code that would tell number of ships in planet with id 2? =) 2010-10-24T04:02:37 Reading theory have been always a bit hard for me.. understanding from simple example makes it a lot easier 2010-10-24T04:02:59 pw.GetPlanet(2).NumShips() 2010-10-24T04:03:28 this should fix my security problem, right? http://github.com/amstan/hyperserv/commit/02d70871c4b7dc7d7f3812860b3e7067039a9dab 2010-10-24T04:03:30 untested and just from looking at PlanetWars.h but that should do it :) 2010-10-24T04:04:29 oh... cool 2010-10-24T04:04:54 so if there is integer x =pw.GetPlanet(2).NumShips() it would get the fleet amount? 2010-10-24T04:05:31 yes int x = pw.GetPlanet(2).NumShips(); should leave x with the number of ships on planet 2 2010-10-24T04:05:55 Thank you a lot 2010-10-24T04:06:02 that makes a lot more sense 2010-10-24T04:06:13 *** whereby has quit IRC (Quit: Page closed) 2010-10-24T04:06:16 amstan: looks ok at first glance, but I think a whitelist of approved characters is probably safer overall 2010-10-24T04:10:34 *** iNtERrUpT has joined #aichallenge 2010-10-24T04:11:32 Top 10 players: bocsimacko(3947), felixcoto(3918), Hazard(3897), rsergio(3857), cfaftw(3837), davidjliu(3803), dmj111(3782), sin_sun(3750), jambachili(3745), sequoh(3710) 2010-10-24T04:13:32 I'm still abit confused when to use p and when pw 2010-10-24T04:15:00 pw when they are under class PlanetWars? 2010-10-24T04:15:52 pw and p are just variable names of course you can call them whatever you want 2010-10-24T04:16:06 in the case of the starter bot in the DoTurn function 2010-10-24T04:16:26 pw is the name of the PlanetWars object passed in as an argument 2010-10-24T04:16:41 ah.. so I can call them what ever I want :) 2010-10-24T04:16:45 and p is used a couple of times for a variable for Planet objects 2010-10-24T04:17:10 just like source is used for an int variable 2010-10-24T04:17:31 int source = -1; << int variable 2010-10-24T04:17:57 const Planet& p ... << type of Planet object variable 2010-10-24T04:18:09 specifically a const reference 2010-10-24T04:18:22 the const and & act the same as in C 2010-10-24T04:18:33 ok 2010-10-24T04:18:55 Nice to see you have time to go so basics with newbie 2010-10-24T04:19:42 really though I think you'd be better of in a higher level language, this is just the beginning of the learning curve for C++ 2010-10-24T04:19:52 *** Sarin has joined #aichallenge 2010-10-24T04:20:22 I'm just newb at C++ 2010-10-24T04:20:32 Well learning this also may help me at work 2010-10-24T04:20:43 since I need to coordinate with IT coders there.. 2010-10-24T04:21:04 atleast to get some insight what they are doing.. 2010-10-24T04:22:04 just the concepts will be easier to pick up elsewhere without all of the C++ complexity and then transfer them back to C++ will be much easier, but anyway I gotta go so good luck 2010-10-24T04:22:42 i found c++ easier than other languages 2010-10-24T04:22:45 it's certainly easier than c 2010-10-24T04:23:03 the only time i ever have to delete anything is when i make trees 2010-10-24T04:23:06 ? it's C + other stuff 2010-10-24T04:23:08 janzert: cya 2010-10-24T04:23:18 Zalma: vectors are your new best friend 2010-10-24T04:23:26 Yes I know 2010-10-24T04:23:29 :) 2010-10-24T04:23:38 * Zalma like vectors 2010-10-24T04:23:51 ahh, well it does help a little more with memory management than C 2010-10-24T04:24:04 a little? :P 2010-10-24T04:24:17 go to a *real* high level language :) 2010-10-24T04:24:25 i will learn haskell soon 2010-10-24T04:24:48 C++ is much closer to C in memory management than it is to fully GC'd language 2010-10-24T04:24:49 btw.. why ppl call multidiensional arrays/matrixes still as vectors? =) 2010-10-24T04:24:56 *dimensonal 2010-10-24T04:25:06 they are vectors 2010-10-24T04:25:12 vectors of vectors 2010-10-24T04:25:16 * janzert is really out now :) 2010-10-24T04:25:20 well vectors are really always 1 dimensional :P 2010-10-24T04:25:41 i have a c++ struct that does nd tensors which puts it all into a 1d vector 2010-10-24T04:26:24 i have 2 complaints about c++ 2010-10-24T04:26:24 1. i can't overload operator precedence 2010-10-24T04:26:24 2. i can't write functions for nd vectors arbitrarily 2010-10-24T04:26:56 Well I have no idea what that means :) 2010-10-24T04:27:17 operator precedence is the order the operations are performed with say 2*3^6 2010-10-24T04:27:36 or put matrices in there, i can't overload ^ precendence to avoid () in lines 2010-10-24T04:28:14 and nd vector is like say i want a "tensor" class, where the input parameter defines the number of dimensions, i can't do that without writing my own class 2010-10-24T04:29:32 mkay... 2010-10-24T04:29:58 *** Azrathud has quit IRC (Ping timeout: 276 seconds) 2010-10-24T04:30:27 u just confuse me with all the fancy words ;) 2010-10-24T04:30:36 I'm no expert in programming.. 2010-10-24T04:30:38 which fancy words? :P 2010-10-24T04:30:41 neither am i 2010-10-24T04:30:45 i'm just a student 2010-10-24T04:30:50 more of a maths student than anything 2010-10-24T04:31:00 I hate math.. 2010-10-24T04:31:06 that's nice 2010-10-24T04:31:50 I just completed my compulsory courses after 7 years :P 2010-10-24T04:32:00 I mean compulsory math courses.. 2010-10-24T04:32:08 maths gets interesting once you get to uni 2010-10-24T04:32:17 I am in university :P 2010-10-24T04:32:32 past the first two years of calculus anyway :P 2010-10-24T04:32:35 doing my master thesis at the moment 2010-10-24T04:32:43 ah okay 2010-10-24T04:32:51 what's to hate about maths? 2010-10-24T04:32:56 it's wonderful 2010-10-24T04:33:38 well I'm engineer.. pure theoretical math is too utopistic.. 2010-10-24T04:33:54 all the integrating makes my head hurt 2010-10-24T04:34:11 measure theory makes my head hurt 2010-10-24T04:34:40 and this godamn game 2010-10-24T04:34:46 it's impenetrable i swear 2010-10-24T04:35:00 btw I'm not studying IT or enything like that anyway... studying energy/powerplant technology 2010-10-24T04:36:29 only place where you would need high match skill would be computational science in there.. like doing cfd 2010-10-24T04:36:41 match=math 2010-10-24T04:37:18 i graduate in a month with majors in cs, economics and pure maths, i very much intend to use maths my whole life :P 2010-10-24T04:37:31 i'm going onto to do post grad maths next year 2010-10-24T04:37:37 onto == on 2010-10-24T04:38:12 that's if i ever get around to studying for my exams 2010-10-24T04:38:24 i have an exam tuesday and i haven't been to a class since first week or started studying 2010-10-24T04:38:25 meh 2010-10-24T04:38:43 one day study dates have been performed before 2010-10-24T04:38:55 *** Olathe has quit IRC (Ping timeout: 240 seconds) 2010-10-24T04:39:02 the biggest problem is that I need to understand what all operations etc means and how they refer to real life.. 2010-10-24T04:39:14 because of that math is quite difficult for me 2010-10-24T04:39:29 since they always don't have good reference in real life.. 2010-10-24T04:39:39 they do, they just aren't given 2010-10-24T04:40:13 I mean the way how human mind can understand them.. atleast engineers mind :P 2010-10-24T04:40:49 anyway, i'm rewriting a new heuristic bot 2010-10-24T04:40:54 i was way too premature at making a tree 2010-10-24T04:41:32 Well if I get on the way I may try to use some evolutionary algorithm :P 2010-10-24T04:41:57 i'm considering throwing out moves from the other player entirely 2010-10-24T04:42:04 it's way too messy to coordinate that and future moves 2010-10-24T04:42:10 and one needs to consider future moves 2010-10-24T04:43:52 I'm also considering to use some randome element and probability mathematics 2010-10-24T04:44:09 that mathematics area isn't so hard :) 2010-10-24T04:45:11 for that I would need a lot of data collected first thou 2010-10-24T04:45:36 the problem is incredibly hard 2010-10-24T04:45:42 i've been thinking about it for a good month now 2010-10-24T04:45:57 there's sooo much information that feeds into everytihng else 2010-10-24T04:46:21 yea :) 2010-10-24T04:46:43 thats always problem for game AI :P 2010-10-24T04:51:32 btw r u using windows or unix based system? 2010-10-24T04:51:41 windows 2010-10-24T04:52:07 what do u use to compile your bot? 2010-10-24T04:55:13 since I haven't compiled my project yet at all just tryed to figure out all sorts of things.. I'm not really familiar to these windows based IDEs.. back in school days we used dos based borland =P 2010-10-24T04:55:56 I'm using currenly visual studio 2010 since I get it free from dreamspark 2010-10-24T04:57:07 *** iNtERrUpT has quit IRC (Ping timeout: 276 seconds) 2010-10-24T04:58:20 *** iNtERrUpT has joined #aichallenge 2010-10-24T04:58:29 i use codeblocks 2010-10-24T04:58:30 it's nice 2010-10-24T05:00:11 My minimax bot does 20k nodes/sec... now if only they were good nodes... :( 2010-10-24T05:04:16 maybe I try that codeblocks.. 2010-10-24T05:05:02 only if I could download it... too many clients =E 2010-10-24T05:09:33 to compile the bot I need to first make them as project right? 2010-10-24T05:11:33 Top 10 players: bocsimacko(3954), felixcoto(3922), Hazard(3901), rsergio(3857), cfaftw(3847), davidjliu(3808), dmj111(3777), sin_sun(3754), jambachili(3750), sequoh(3715) 2010-10-24T05:16:42 *** iNtERrUpT has quit IRC (Ping timeout: 240 seconds) 2010-10-24T05:17:37 cool.. I was first time able to compile my bot and it works.. codeblocks made it a lot easier :) 2010-10-24T05:20:25 *** antimatroid has quit IRC (Ping timeout: 264 seconds) 2010-10-24T05:44:17 btw is there constant amount of planets and if not what is max amount? 2010-10-24T05:44:32 *** wvdschel has quit IRC (Ping timeout: 265 seconds) 2010-10-24T05:46:25 *** iNtERrUpT has joined #aichallenge 2010-10-24T06:01:06 Zalma, always 23 planets it seems 2010-10-24T06:01:33 thx 2010-10-24T06:03:01 mm[i][3] = pw.GetPlanet[i].Owner(); <-- is that valid? =) 2010-10-24T06:03:30 *** iNtERrUpT has quit IRC (Ping timeout: 240 seconds) 2010-10-24T06:03:32 where i is planet id 2010-10-24T06:10:09 well I guess it was supposed to be getplanet(i) thou 2010-10-24T06:11:32 Top 10 players: bocsimacko(3968), felixcoto(3935), Hazard(3906), rsergio(3864), cfaftw(3854), davidjliu(3804), dmj111(3790), jambachili(3773), sin_sun(3752), luksian(3711) 2010-10-24T06:12:45 *** iNtERrUpT has joined #aichallenge 2010-10-24T06:19:49 *** iNtERrUpT has quit IRC (Ping timeout: 276 seconds) 2010-10-24T06:20:56 *** iNtERrUpT has joined #aichallenge 2010-10-24T06:27:52 *** Mekanik has joined #aichallenge 2010-10-24T06:30:14 *** TomyMMX has joined #aichallenge 2010-10-24T06:31:15 *** jesionaj` has quit IRC (Ping timeout: 240 seconds) 2010-10-24T06:32:25 can anyone tell me what the best way is to extract game data from a game played on the server.. ok I can navigate to http://ai-contest.com/game_info.php?game_id=xxxxxxx.. but the game string there is not the same as needed for bot input 2010-10-24T06:40:52 *** iNtERrUp_ has joined #aichallenge 2010-10-24T06:43:00 *** iNtERrUpT has quit IRC (Ping timeout: 265 seconds) 2010-10-24T06:51:44 *** Tobu has joined #aichallenge 2010-10-24T06:58:42 *** RainCT has joined #aichallenge 2010-10-24T06:58:49 *** p4p4 has joined #aichallenge 2010-10-24T07:04:17 is distance working like this Dist=pw.Distance(i,j) where i & j are planet IDs as integer? 2010-10-24T07:08:52 Or is therea tool to reply server games localy? 2010-10-24T07:11:33 Top 10 players: bocsimacko(3965), felixcoto(3933), Hazard(3903), rsergio(3861), cfaftw(3852), davidjliu(3801), dmj111(3792), jambachili(3768), sin_sun(3749), luksian(3706) 2010-10-24T07:13:20 *** p4p4_ has joined #aichallenge 2010-10-24T07:16:09 *** p4p4 has quit IRC (Ping timeout: 252 seconds) 2010-10-24T07:17:53 *** p4p4 has joined #aichallenge 2010-10-24T07:20:33 *** p4p4_ has quit IRC (Ping timeout: 252 seconds) 2010-10-24T07:31:09 *** iNtERrUp_ has quit IRC (Remote host closed the connection) 2010-10-24T07:32:00 gah.. I wonder why I get 'const class Planet' has no member named 'x'| 2010-10-24T07:32:05 doesn't it have it? 2010-10-24T07:34:21 *** iNtERrUpT has joined #aichallenge 2010-10-24T07:44:46 *** Bobng has joined #aichallenge 2010-10-24T07:56:55 *** TomyMMX has quit IRC (Ping timeout: 265 seconds) 2010-10-24T08:00:09 *** JensT1 has joined #aichallenge 2010-10-24T08:06:18 *** antimatroid has joined #aichallenge 2010-10-24T08:08:54 *** mceier has joined #aichallenge 2010-10-24T08:11:33 Top 10 players: bocsimacko(3980), felixcoto(3925), Hazard(3913), rsergio(3893), cfaftw(3855), sin_sun(3802), davidjliu(3801), jambachili(3790), sequoh(3710), luksian(3707) 2010-10-24T08:20:07 *** jmcarthur has quit IRC (Ping timeout: 276 seconds) 2010-10-24T08:24:43 *** jmcarthur has joined #aichallenge 2010-10-24T08:28:11 *** yasith has quit IRC (Ping timeout: 252 seconds) 2010-10-24T08:29:52 *** nibalizer has quit IRC (Ping timeout: 276 seconds) 2010-10-24T08:30:00 *** Tobu has quit IRC (Ping timeout: 255 seconds) 2010-10-24T08:30:02 *** nibalize1 has joined #aichallenge 2010-10-24T08:30:18 *** yasith has joined #aichallenge 2010-10-24T08:33:03 *** Tobu has joined #aichallenge 2010-10-24T08:33:18 *** Tobu has joined #aichallenge 2010-10-24T08:34:25 *** genericbob has quit IRC (Ping timeout: 276 seconds) 2010-10-24T08:34:33 *** genericb1b has joined #aichallenge 2010-10-24T08:35:02 *** j3camero has quit IRC (Ping timeout: 276 seconds) 2010-10-24T08:35:22 *** j3camero has joined #aichallenge 2010-10-24T09:11:33 Top 10 players: bocsimacko(3996), felixcoto(3910), Hazard(3904), rsergio(3876), cfaftw(3845), jambachili(3809), davidjliu(3793), sin_sun(3793), sequoh(3727), RebelXT(3706) 2010-10-24T09:12:30 *** delt0r has joined #aichallenge 2010-10-24T09:13:07 *** delt0r___ has quit IRC (Ping timeout: 255 seconds) 2010-10-24T09:22:14 *** dmj111 has joined #aichallenge 2010-10-24T09:22:30 *** shades has quit IRC (Read error: Operation timed out) 2010-10-24T09:25:03 *** fawek has joined #aichallenge 2010-10-24T09:31:07 *** allsystemsarego has joined #aichallenge 2010-10-24T09:38:28 *** Bobng has quit IRC (Quit: Leaving) 2010-10-24T09:40:37 *** Bobng has joined #aichallenge 2010-10-24T09:41:01 *** jmcarthur has quit IRC (Quit: WeeChat 0.3.0) 2010-10-24T09:41:19 *** jmcarthur has joined #aichallenge 2010-10-24T09:45:25 *** davidjliu has joined #aichallenge 2010-10-24T09:46:42 *** javagamer has quit IRC (Read error: Connection reset by peer) 2010-10-24T09:47:44 *** javagamer has joined #aichallenge 2010-10-24T09:47:54 *** boegel has joined #aichallenge 2010-10-24T09:56:22 *** jaspervdj has joined #aichallenge 2010-10-24T10:01:23 do I have to include maps, example bots and tools in my .zip I send? 2010-10-24T10:02:23 Zalma: no 2010-10-24T10:02:25 just code 2010-10-24T10:03:05 *** choas has joined #aichallenge 2010-10-24T10:05:07 wow my first bot I made from scratch compiled without problems.. 2010-10-24T10:05:22 thou bad side is that it's not doing anything :) 2010-10-24T10:05:26 *** Bobng has quit IRC (Quit: Leaving) 2010-10-24T10:05:50 it doesn't crash either 2010-10-24T10:06:16 btw if there is some problem with using objects or variables would my bot crash or wouldn't compile? 2010-10-24T10:06:18 *** Bobng has joined #aichallenge 2010-10-24T10:11:34 Top 10 players: bocsimacko(3984), felixcoto(3896), Hazard(3895), rsergio(3852), cfaftw(3821), jambachili(3802), davidjliu(3777), sin_sun(3772), sequoh(3722), RebelXT(3702) 2010-10-24T10:12:06 *** seisatsu has quit IRC (Quit: Leaving) 2010-10-24T10:12:46 *** irchs has joined #aichallenge 2010-10-24T10:13:04 hmmm.... how does one change their organisation on the challenge site? 2010-10-24T10:13:12 I have tried the forum post method but it doesn't seem to work 2010-10-24T10:14:50 the forum posts have to be manually converted by someone, but indeed, it has been a long time since I posted too, and it isn't updated 2010-10-24T10:15:51 ah I thought they had a script scanning it or something.... 2010-10-24T10:16:08 because of the specific format requirements 2010-10-24T10:20:37 btw does player home planets have some standard ID for example 1 &2? 2010-10-24T10:20:49 or they are just random 2010-10-24T10:22:25 when generated by the python script they are, but I should not make assumptions they will always be like that 2010-10-24T10:23:27 Well I'm just trying to figure out whats wrong with my code :P 2010-10-24T10:24:08 Are there a lot of random nonstart games happening on the contest server recently? 2010-10-24T10:24:22 morning 2010-10-24T10:25:21 morning 2010-10-24T10:26:38 wassup 2010-10-24T10:28:12 reading a book, taking a break from coding my bot 2010-10-24T10:28:20 my full bot logic is scribbled on a piece of paper 2010-10-24T10:28:27 :P 2010-10-24T10:29:15 heh, i should do that 2010-10-24T10:29:24 my bot is becoming a mish mash of if then else blocks 2010-10-24T10:30:22 whose bot is CosmpolitanCoconut on tcp? 2010-10-24T10:31:14 *** Appleman1234 has quit IRC (Ping timeout: 250 seconds) 2010-10-24T10:32:12 http://ai-contest.com/visualizer.php?game_id=6128625 It says I won, but it should be a draw, I think its a bug... 2010-10-24T10:33:22 maybe you have a extra ship in flight or something? 2010-10-24T10:34:05 actually i think i shold have that one 2010-10-24T10:34:05 *** Spike_007 has joined #aichallenge 2010-10-24T10:34:10 i got my planets before you did 2010-10-24T10:34:11 hi all 2010-10-24T10:34:37 and in fact hmm you lost a planet too 2010-10-24T10:34:50 weird 2010-10-24T10:34:59 at Turn 7 2010-10-24T10:35:01 i have 4 planets 2010-10-24T10:35:03 you have 3 2010-10-24T10:35:09 i should be ahead by a few ships 2010-10-24T10:35:38 and at turn 19 you lose your planet too 2010-10-24T10:35:39 for one turn 2010-10-24T10:35:40 weird 2010-10-24T10:36:13 at the end we have an equal amount of ships 2010-10-24T10:36:19 thats all that matters 2010-10-24T10:37:40 but i don't understand how that is possible 2010-10-24T10:37:44 we have identical growth rates 2010-10-24T10:37:50 and i got the planets before you did 2010-10-24T10:37:55 so technically i should be ahead 2010-10-24T10:38:10 since i never lose control of my planets 2010-10-24T10:38:38 *** rebelxt_ has joined #aichallenge 2010-10-24T10:39:07 *** gerald512kk has quit IRC () 2010-10-24T10:39:35 no 2010-10-24T10:39:44 you wasted some on trying to capture bottom right back 2010-10-24T10:39:59 which allowed me to get even in center again 2010-10-24T10:40:04 hmm 2010-10-24T10:40:04 funny match 2010-10-24T10:40:17 but still 2010-10-24T10:40:19 actually no 2010-10-24T10:40:21 i shouldn't have won 2010-10-24T10:40:41 at turn 4 we both take central 2010-10-24T10:40:49 at turn 7 2010-10-24T10:40:51 i take two planets 2010-10-24T10:40:52 you take 1 2010-10-24T10:41:00 you take another one at turn 8 2010-10-24T10:41:05 so i should be ahead in ships 2010-10-24T10:41:31 ohhh wait 2010-10-24T10:41:34 doh 2010-10-24T10:41:38 i took a 61 ship planet 2010-10-24T10:41:41 you took a 34 2010-10-24T10:41:48 thats where the difference came 2010-10-24T10:41:49 yeah 2010-10-24T10:41:50 =) 2010-10-24T10:42:05 ah 2010-10-24T10:42:16 i was thinking we took identical planets 2010-10-24T10:42:26 *** DanielVF has joined #aichallenge 2010-10-24T10:42:56 no, but you should've ;) 2010-10-24T10:43:04 *** DanielVF has left #aichallenge 2010-10-24T10:43:21 just resubmitted a bot that got me to rank 112 a while ago 2010-10-24T10:43:29 I'm wondering where it'll get me now... 2010-10-24T10:43:29 well my cost function is a bit different 2010-10-24T10:43:45 my current "state-of-the-art" bort only got to 704 :( 2010-10-24T10:43:54 anyone wanna help me a bit? 2010-10-24T10:44:01 kartta[i][1] = pw.GetPlanet(i).Owner(); <-- is this valid? 2010-10-24T10:44:25 if I try to add owner of planed id i to table 2010-10-24T10:44:35 where i is integer 2010-10-24T10:44:40 seem right 2010-10-24T10:44:46 but that really depends 2010-10-24T10:44:53 are you aving problems with it? 2010-10-24T10:45:01 I'm not sure where is my problem... 2010-10-24T10:45:08 my bot just doesn't do anything :P 2010-10-24T10:45:17 it compiles right and doesn't time out or crash 2010-10-24T10:48:37 Zalma, did you try debugging it? i.e print debug info to stderr or log to file when playing example bots locally 2010-10-24T10:49:34 how do I do that? 2010-10-24T10:50:02 what lang are you using? 2010-10-24T10:50:43 c++ 2010-10-24T10:50:54 I know how to play locally but how to make a log 2010-10-24T10:53:16 *** jklandis has joined #aichallenge 2010-10-24T10:53:16 can you print to stderr? if you use latest version of the starter pack, this should work 2010-10-24T10:56:38 how can I do that? =) 2010-10-24T10:56:56 cerr << kartta[i][1] << endl; 2010-10-24T10:57:25 #include 2010-10-24T10:58:11 hmhp 2010-10-24T10:58:20 btw it seems I found atleast one bug 2010-10-24T10:58:55 if I have int x[10][2] then it would be from 0 to 9 and 0 to 1 right? 2010-10-24T10:59:06 if you don't see any of your logging info printed out, see this topic: http://ai-contest.com/forum/viewtopic.php?f=18&t=534 2010-10-24T10:59:21 yeah 2010-10-24T10:59:22 *** irchs is now known as janstaunton 2010-10-24T11:00:25 I get error: 'cerr' was not declared in this scope| 2010-10-24T11:00:28 it did not take mega1 long time to get #1! 2010-10-24T11:00:34 and same for endl 2010-10-24T11:00:37 contestbot: rankings 2010-10-24T11:00:39 rebelxt_: Top 10 players: bocsimacko(3993), felixcoto(3909), Hazard(3902), rsergio(3857), cfaftw(3822), jambachili(3810), davidjliu(3784), sin_sun(3779), sequoh(3736), RebelXT(3709) 2010-10-24T11:00:51 I do have iostream... 2010-10-24T11:02:09 if you have iostream included, try "std::cerr" 2010-10-24T11:02:26 or add "using namespace std" 2010-10-24T11:05:05 Atleast that compiled now :) 2010-10-24T11:07:37 well log file doesn't have anything else but initializing 2010-10-24T11:10:45 check that forum post. check that your DoTurn is getting called 2010-10-24T11:11:25 *** rebelxt_ has quit IRC (Quit: Page closed) 2010-10-24T11:11:34 Top 10 players: bocsimacko(3994), felixcoto(3909), Hazard(3902), rsergio(3858), cfaftw(3820), jambachili(3810), davidjliu(3784), sin_sun(3780), sequoh(3737), RebelXT(3710) 2010-10-24T11:14:23 *** rebelxt_ has joined #aichallenge 2010-10-24T11:17:01 *** Olathe has joined #aichallenge 2010-10-24T11:17:51 it seems problem was ShowGame.jar & PlayGame.jar for that debugging 2010-10-24T11:18:02 I downloaded newer versions and atleast now I can debug 2010-10-24T11:19:03 anyway.. thx a lot this makes this a lot easier :) 2010-10-24T11:19:49 73 \o/ 2010-10-24T11:20:36 rebel start up your bot 2010-10-24T11:20:49 Zalma: cool, glad you got it resolved 2010-10-24T11:21:14 but still there is problem with my bot.. now this just raises more questions ;) 2010-10-24T11:21:46 bhasker: ok i'll start my last official.. 2010-10-24T11:22:07 for example kartta[1][1] = pw.GetPlanet(i).Owner(); that gets really weird values 2010-10-24T11:22:10 *** Commandir has joined #aichallenge 2010-10-24T11:22:41 376 or 10523682 2010-10-24T11:23:00 and I though player id should be only 0, 1 or 2 :P 2010-10-24T11:24:14 lets see 2010-10-24T11:24:17 how mine does 2010-10-24T11:25:25 malazan0.8? 2010-10-24T11:25:48 *** mega1 has joined #aichallenge 2010-10-24T11:25:56 you beat mine last night. only had one game 2010-10-24T11:26:12 mega1: grats on #1! 2010-10-24T11:27:00 rebelxt_: thanks, maybe it's time to upload b0.30 2010-10-24T11:27:19 I see new names on tcp 2010-10-24T11:27:23 well I think problem is with my tables or my loops 2010-10-24T11:27:39 since if I tried test = pw.GetPlanet(1).Owner(); it returned 1 2010-10-24T11:27:57 mega1: 0.30 is just too strong. i never won a single game against it on tcp... 2010-10-24T11:28:02 Are there any other ways of changing one's organisation apart from the forum? 2010-10-24T11:28:46 Zalma, yeah just keep adding more debug printouts until you figure out what's wrong 2010-10-24T11:29:08 yup 2010-10-24T11:29:11 malazan0.8 2010-10-24T11:29:33 george looks pretty strong 2010-10-24T11:31:21 thanks for making me lose sleep trying to figure out how to beat your bot ;-) 2010-10-24T11:32:15 have you? 2010-10-24T11:32:21 ... figured something out? 2010-10-24T11:32:44 *** perror has joined #aichallenge 2010-10-24T11:32:48 exposure at #1 is not a good thing 2010-10-24T11:32:59 too many guys focusing on your weaknesses 2010-10-24T11:33:04 of which there are plenty. 2010-10-24T11:33:51 well, that's true. i am not having luck making any significant improvements at the moment 2010-10-24T11:34:21 revelxt_: i feel your pain 2010-10-24T11:34:29 i've bee rethinking my backend entirely 2010-10-24T11:35:00 i've given up for the moment on making future moves from both players against each other every turn 2010-10-24T11:35:08 and gone back to focusing on just my moves 2010-10-24T11:36:21 antimatroid: "every turn" of the real game or of the simulated future (or the game tree)? 2010-10-24T11:36:51 in my simulated game 2010-10-24T11:36:58 it's damn near impossible to do it i swear 2010-10-24T11:37:08 i can do it for myself but not from both 2010-10-24T11:37:40 it gets too messy in planet ownerships alternating 2010-10-24T11:38:14 *** p4p4 has quit IRC (Quit: ChatZilla 0.9.84 [SeaMonkey 2.0a3/20090223135443]) 2010-10-24T11:39:22 antimatroid: I considered it, but there is much invalidation of moves and reconsidering to do. 2010-10-24T11:39:40 A future move is just a plan, nothing more. 2010-10-24T11:40:02 You can't do meaningful search having to go back and forth in time. 2010-10-24T11:40:14 A future move also involves reserving ships in the present. 2010-10-24T11:40:31 At least not when the dependencies are like in this game. 2010-10-24T11:40:36 Additionally, in order to send ships, you have to own the planet 2010-10-24T11:42:41 It's not enough just to have the ships there 2010-10-24T11:42:55 Any sufficiently advanced technology is indistuinguisable from magic but george's bot certainly looks like it searches the game tree. 2010-10-24T11:43:46 mega1: so you aren't even considering if you have a better move next turn? 2010-10-24T11:43:56 I am 2010-10-24T11:44:23 but opponent moves are not yet properly simulated 2010-10-24T11:44:37 antimatroid: i have it working, but just nog proper pruning >_> 2010-10-24T11:44:38 yeah, i was very premature at throwing stuff at a game tree 2010-10-24T11:44:58 s/nog/not 2010-10-24T11:45:01 Error323: working with future moves from both players without bugs? i doubt it :P 2010-10-24T11:45:06 is RS on tpc rsergio? 2010-10-24T11:45:08 yep 2010-10-24T11:45:23 well afaik it works fine 2010-10-24T11:45:33 but took me a week 2010-10-24T11:45:40 *** hellman has quit IRC (Remote host closed the connection) 2010-10-24T11:45:43 and then discarded it 2010-10-24T11:45:46 -.- 2010-10-24T11:45:58 well its in a branch in git 2010-10-24T11:46:08 are you just removing outgoing fleets whenever ownership changes? i expect that to fuck up the evaluation of the game state with moves 2010-10-24T11:46:29 i am 2010-10-24T11:46:39 but because of recursion you can jump back a state 2010-10-24T11:46:45 i keep a stack of the gamestate 2010-10-24T11:46:46 *** Spike_007 has quit IRC (Ping timeout: 276 seconds) 2010-10-24T11:47:00 yay 2010-10-24T11:47:12 i could show you the prototype i guess 2010-10-24T11:47:16 my tree just has a vector of extendable nodes and keeps extending for as long as it can 2010-10-24T11:47:23 now I got my bot working but example bots keep timing out... 2010-10-24T11:47:28 I wonder whats the reason 2010-10-24T11:47:38 you sure it's the example bots :P 2010-10-24T11:47:52 last night i did some reading on what best Go programs have to do to be even remotely competitive with average human players: http://www.jellyfish-go.com/ai.htm 2010-10-24T11:48:09 *** hellman has joined #aichallenge 2010-10-24T11:48:53 yea its always example bot one that times out :P 2010-10-24T11:48:56 of course people invested thousands of hours into these Go programs, and this contest is much shorter 2010-10-24T11:48:58 and that is weird 2010-10-24T11:50:29 It seems my bot gives some invalid input.. what does that mean? 2010-10-24T11:50:44 this game is still very complicated 2010-10-24T11:51:06 Has any one gotten subgame analysis to work? 2010-10-24T11:51:11 i was hoping to approximate perfect play to begin with, now i'm almost at a complete loss as to how to do anything reasonably 2010-10-24T11:51:30 jklandis: nope 2010-10-24T11:51:37 i considered trying to turn it into a repeated game 2010-10-24T11:51:39 but it's huge 2010-10-24T11:51:48 http://paste.pocoo.org/show/279697/ 2010-10-24T11:51:51 there it is 2010-10-24T11:51:52 hf 2010-10-24T11:52:19 It seems like some maps have regions that can be considered separately. 2010-10-24T11:52:26 But not all maps 2010-10-24T11:53:17 not really 2010-10-24T11:53:34 i considered trying to create subgraphs based on moves i'm willing to make 2010-10-24T11:53:46 but i sort of already do that anyway, without going through constructing such subgraphs 2010-10-24T11:55:55 Can someone tell me what invalid input actually mean? 2010-10-24T11:56:20 but bot always fails in turn 30-40 with invalid input 2010-10-24T11:56:31 *** janstaunton has quit IRC (Quit: janstaunton) 2010-10-24T11:57:11 it means you are doing sth wrong ;-) 2010-10-24T11:57:18 or rly 2010-10-24T11:57:55 I mean does it mean I'm trying to attack to planet that doesn't excist or someting? 2010-10-24T11:58:43 or sending too many fleets or sending from planet what you don't own 2010-10-24T11:58:46 Zalma you might be trying to send more ships that your planet has, or trying to send ships from enemy planet 2010-10-24T11:58:59 or neutral 2010-10-24T11:59:01 it seems it always happens when I'm going to capture my 4th or 5th planet 2010-10-24T11:59:24 or even plain sending something out stdout that just can't be parsed 2010-10-24T11:59:24 just print out every fleet your bot is trying to send (source planet, target, number of ships), and you will see invalid order 2010-10-24T11:59:56 Zalma: make sure you correctly update the number of ships you have at your planets when you make a move 2010-10-24T12:00:42 revelxt_: thanks for that, i hate reading my own code let alone other peoples :P 2010-10-24T12:02:34 ;-D 2010-10-24T12:04:41 *** rebelxt_ has quit IRC (Quit: Page closed) 2010-10-24T12:06:28 yeah.. I was finally able to finish my battle :P 2010-10-24T12:08:16 bhasker: if you're around you can see on naktibalda's visualizer that Error323 did get an early lead and held it in the very very close game earlier 2010-10-24T12:08:58 *** janzert has quit IRC (Read error: Connection reset by peer) 2010-10-24T12:09:23 *** janzert has joined #aichallenge 2010-10-24T12:09:38 irc client decided to crash of course 2010-10-24T12:09:49 link to that game is http://visualizer.naktibalda.lt/484 2010-10-24T12:09:55 janzert: I'm working on 202 2010-10-24T12:10:40 I'm going to try using select 2010-10-24T12:11:06 wait, is there another unofficial server or is that just pasted there? 2010-10-24T12:11:36 Top 10 players: bocsimacko(4008), felixcoto(3910), Hazard(3909), rsergio(3860), cfaftw(3829), jambachili(3803), davidjliu(3785), sin_sun(3766), RebelXT(3728), sequoh(3726) 2010-10-24T12:11:38 http://visualizer.naktibalda.lt ? 2010-10-24T12:11:48 just a place you can upload game data to 2010-10-24T12:11:52 My theory is that thread/process scheduling, together with polling overhead, is causing it. 2010-10-24T12:12:30 jklandis: you're implementing the process listed in your last comment? 2010-10-24T12:12:36 no 2010-10-24T12:12:59 ok, just switching to a pure select based wait? 2010-10-24T12:13:04 yes 2010-10-24T12:13:11 no polling 2010-10-24T12:13:17 select with timeout 2010-10-24T12:13:21 yeah, ok 2010-10-24T12:14:21 I really think keeping the blocking I/O and having the i/o threads set an event back to the main thread is the best way to go, but I would probably accept a select based method too 2010-10-24T12:14:38 just have to test it a little more thoroughly 2010-10-24T12:14:44 *** irchs has joined #aichallenge 2010-10-24T12:14:46 I thought about threads, and it just makes scheduling problems worse 2010-10-24T12:14:56 You can't just sleep and hope things get scheduled 2010-10-24T12:15:08 you don't have to sleep 2010-10-24T12:15:28 So you have worker threads dumping lines into a queue 2010-10-24T12:15:32 the io threads stay blocked reading input and the main thread blocks waiting for threading.Event 2010-10-24T12:15:49 like they do now if I'm remembering correctly 2010-10-24T12:16:10 Right now each bot gets a reader thread 2010-10-24T12:16:18 yep 2010-10-24T12:16:20 and it dumps output into a separate queue 2010-10-24T12:16:24 stays the same 2010-10-24T12:16:31 *** Titankiller has quit IRC (Ping timeout: 276 seconds) 2010-10-24T12:16:47 actually combining to one queue is probably simpler 2010-10-24T12:16:49 what should happen under the threaded design is that they use the same queue 2010-10-24T12:16:52 right 2010-10-24T12:17:23 otherwise threading doesn't actually solve the multiplexing problem 2010-10-24T12:17:30 it just moves it 2010-10-24T12:17:33 *** irchs has quit IRC (Client Quit) 2010-10-24T12:17:58 and actually if you use one queue the main thread can just wait on the queue no event needed 2010-10-24T12:18:05 *** Titankiller has joined #aichallenge 2010-10-24T12:18:26 I would hope Python would provide a thread-safe queue for this kind of ting 2010-10-24T12:18:36 yes, 2010-10-24T12:18:40 where removing blocks until something is added 2010-10-24T12:18:44 look at the Queue module 2010-10-24T12:18:51 That's what is being used now 2010-10-24T12:19:01 and it's thread safe? 2010-10-24T12:19:04 err no ? 2010-10-24T12:19:12 s/?/! 2010-10-24T12:19:28 says synchronized in the docs 2010-10-24T12:19:49 " It is especially useful in threaded programming when information must be exchanged safely between multiple threads" 2010-10-24T12:20:12 which is thread safe, it's not an non-locking design but is thread safe 2010-10-24T12:20:37 *** Accoun has quit IRC (Ping timeout: 255 seconds) 2010-10-24T12:20:49 Here is another issue to consider 2010-10-24T12:20:51 *** Tobu has quit IRC (Ping timeout: 265 seconds) 2010-10-24T12:20:57 select only works on pipes on Unix 2010-10-24T12:21:07 it's socket-only on Windows 2010-10-24T12:21:13 right 2010-10-24T12:21:15 so a select-based approach wouldn't be portable 2010-10-24T12:21:23 that is one reason I'd like to stay away from select 2010-10-24T12:21:30 Anything else? 2010-10-24T12:21:49 it's also been known to have a fair number of bugs on many different *nix's in the past 2010-10-24T12:22:01 although it should be fairly safe on linux now I believe 2010-10-24T12:23:12 anyway gotta run for probably 8+ hours, thanks for working on this 2010-10-24T12:23:12 OK, I'm convinced 2010-10-24T12:32:41 *** FlagCapper has joined #aichallenge 2010-10-24T12:33:02 *** Xrillo has joined #aichallenge 2010-10-24T12:37:56 *** hornairs has joined #aichallenge 2010-10-24T12:40:26 *** Accoun has joined #aichallenge 2010-10-24T12:42:21 *** tapwater has joined #aichallenge 2010-10-24T12:44:00 *** p4p4 has joined #aichallenge 2010-10-24T12:47:35 *** rebelxt has joined #aichallenge 2010-10-24T13:00:52 *** wvdschel has joined #aichallenge 2010-10-24T13:00:56 *** toodlebug has joined #aichallenge 2010-10-24T13:03:33 hello...? 2010-10-24T13:03:43 hi 2010-10-24T13:04:26 ah... I wasn't sure if anyone was here..... 2010-10-24T13:04:51 alot of names but no text scrolling by..... 2010-10-24T13:05:16 we are here ;-) 2010-10-24T13:05:33 just quiet sometimes 2010-10-24T13:06:15 Im a noob programer seeking help to add a field to the planet class, 2010-10-24T13:07:22 I tried creating a subclass "PlanetX", with the extra field "flag" 2010-10-24T13:08:28 I get incompatable type error when compiling MyBot 2010-10-24T13:08:56 you could modify planet class directly.. or just keep additional state outside of planet class in your bot's class 2010-10-24T13:09:03 can this be done...? or am I spinning my wheels...?? 2010-10-24T13:09:27 can be done of course 2010-10-24T13:10:10 thanks I try to mod the planet class... 2010-10-24T13:11:00 if you just want to maintain a flag associated with each planet, you could have a map in your bot's main class (i.e. map planet id to flag value). this is probably the easiest alternative 2010-10-24T13:11:35 Top 10 players: bocsimacko(3989), felixcoto(3890), Hazard(3875), rsergio(3837), cfaftw(3801), jambachili(3797), davidjliu(3768), sin_sun(3746), RebelXT(3733), sequoh(3709) 2010-10-24T13:12:58 what language are you using btw? 2010-10-24T13:13:09 Hmm... ok , so I create a array using my planet ID.... ( java) 2010-10-24T13:13:41 in Java you could use a HashMap 2010-10-24T13:15:02 I havnt read up on hash... yet Im guessing its like a "perl" style hase 2010-10-24T13:15:06 hash 2010-10-24T13:16:18 map is a key-value dictionary. very fast at looking up values by key 2010-10-24T13:16:29 google HashMap - you will see some good examples 2010-10-24T13:17:08 looking at it now.... thanks 2010-10-24T13:17:36 np 2010-10-24T13:17:43 *** hellman has quit IRC (Remote host closed the connection) 2010-10-24T13:21:53 *** JensT1 has left #aichallenge 2010-10-24T13:22:41 *** davidjliu has quit IRC (Ping timeout: 265 seconds) 2010-10-24T13:22:47 *** Mekanik has quit IRC (Ping timeout: 272 seconds) 2010-10-24T13:25:12 *** davidjliu has joined #aichallenge 2010-10-24T13:31:18 hazard needs to fix this simple bug! ;-) http://ai-contest.com/visualizer.php?game_id=6136012 2010-10-24T13:36:28 *** Mekanik has joined #aichallenge 2010-10-24T13:43:17 *** rebelxt has left #aichallenge 2010-10-24T13:50:48 *** perror has quit IRC (Quit: Bye all !) 2010-10-24T13:57:38 *** bhasker has quit IRC (Quit: bhasker) 2010-10-24T13:58:23 *** Mekanik has quit IRC (Quit: WeeChat 0.3.3) 2010-10-24T14:01:48 *** wvdschel has quit IRC (Quit: Leaving) 2010-10-24T14:04:54 *** virdo has joined #aichallenge 2010-10-24T14:06:14 *** iNtERrUpT has quit IRC (Remote host closed the connection) 2010-10-24T14:11:37 Top 10 players: bocsimacko(3986), Hazard(3916), felixcoto(3886), sin_sun(3793), cfaftw(3791), davidjliu(3780), jambachili(3777), luksian(3730), RebelXT(3730), ruilov(3709) 2010-10-24T14:20:04 *** Azrathud has joined #aichallenge 2010-10-24T14:38:31 *** bhasker has joined #aichallenge 2010-10-24T14:42:02 hah 2010-10-24T14:43:25 i need to stop getting my bot to over extend itself 2010-10-24T14:43:37 always does something stupid and burns up an advantage 2010-10-24T14:47:21 *** iNtERrUpT has joined #aichallenge 2010-10-24T14:48:20 T.T 2010-10-24T14:51:07 *** iNtERrUpT has quit IRC (Remote host closed the connection) 2010-10-24T15:00:14 *** Mjothvitnir has joined #aichallenge 2010-10-24T15:11:42 Top 10 players: bocsimacko(3989), Hazard(3920), felixcoto(3882), cfaftw(3797), davidjliu(3796), sin_sun(3792), jambachili(3782), RebelXT(3736), luksian(3736), ruilov(3724) 2010-10-24T15:12:08 *** Naktibalda has joined #aichallenge 2010-10-24T15:18:42 *** wvdschel has joined #aichallenge 2010-10-24T15:18:43 *** wvdschel has joined #aichallenge 2010-10-24T15:18:47 *** Itkovian has joined #aichallenge 2010-10-24T15:20:11 *** Palmik has quit IRC (Remote host closed the connection) 2010-10-24T15:25:05 *** Mjothvitnir has quit IRC (Quit: Page closed) 2010-10-24T15:25:44 oh mine, reordering calculations for floating point accuracy really hurts playing strenght :-o 2010-10-24T15:25:51 *** onetwo3 has joined #aichallenge 2010-10-24T15:26:24 I hate these kinds of subtle reverse-engineer-me-please ideas hiding as bugs. 2010-10-24T15:27:31 what do you mean ? 2010-10-24T15:27:57 *** bhasker has quit IRC (Quit: bhasker) 2010-10-24T15:28:08 *** rebelxt has joined #aichallenge 2010-10-24T15:28:37 that I now have to understand why losing floating point accuracy helped my evaluation function 2010-10-24T15:29:04 oh ok 2010-10-24T15:29:04 mega1: wow, my bot finally got lucky against yours 2010-10-24T15:29:05 very unpleasant 2010-10-24T15:29:19 mega1: on the official server.. 2010-10-24T15:30:14 nice one 2010-10-24T15:30:32 the stupid git held back 40 when it was attacking 2010-10-24T15:31:18 git? 2010-10-24T15:31:45 http://www.usingenglish.com/forum/general-language-discussions/62341-stupid-git-used-americans-british-alike.html 2010-10-24T15:32:23 hehe 2010-10-24T15:32:26 not the version control system 2010-10-24T15:32:41 although I guess this is the pun that was on Linus' mind 2010-10-24T15:32:44 that's what i was wondering since i use git ;) 2010-10-24T15:33:48 was a good game.. i got lucky grabbing that center planet when you could not snipe it 2010-10-24T15:35:53 in b0.22 (the version on the official server) sniping is a weakness 2010-10-24T15:36:08 both ways. 2010-10-24T15:36:44 ahh, got it. yeah don't think i ever beat 0.30 2010-10-24T15:37:01 mega1, how soon do you bail out on the official server? 0.8s? i recall you saying that 0.9s (?) was still causing time-outs 2010-10-24T15:37:11 yes 2010-10-24T15:37:15 0.8s now 2010-10-24T15:38:01 ok, thanks, i don't want to see time-outs again if i ever get the next bot to work well 2010-10-24T15:38:35 *** wvdschel has quit IRC (Quit: Leaving) 2010-10-24T15:40:15 I think I have narrowed down 202 -- the first-turn timeout problem 2010-10-24T15:40:26 It looks like it has to do with ssh 2010-10-24T15:40:55 in user_sadbox.py 2010-10-24T15:41:55 The bot is blocked on pipe_wait 2010-10-24T15:42:18 and the ssh input end is blocked on unix_stream_data_wait 2010-10-24T15:42:37 So either Python or SSH is buffering the input and it's not getting through 2010-10-24T15:43:24 I don't see the problem if I run the ssh command directly on the console 2010-10-24T15:48:24 user_sadbox, that's nice.. 2010-10-24T15:54:50 I think what happens is that if SSH thinks it's connected to a terminal, it uses line buffering. Otherwise, it uses default buffering 2010-10-24T15:56:09 But why does the problem only happen some of the time? 2010-10-24T15:56:51 Yep. 2010-10-24T15:57:03 If I concatenate all the maps together into one big map and send that 2010-10-24T15:57:12 it's so big SSH doesn't have the choice but to flush 2010-10-24T15:57:24 and it gets sent 2010-10-24T15:57:27 bingo 2010-10-24T15:57:55 I don't understand why this code ever works 2010-10-24T16:00:01 So... how can we force SSH into line-buffering mode? 2010-10-24T16:01:09 jklandis: ssh -t? 2010-10-24T16:01:43 you're running bots via ssh instead of running the tournament on the remote server? 2010-10-24T16:02:27 I'm not sure I understand your question 2010-10-24T16:02:44 oh, er, nevermind 2010-10-24T16:02:44 On the tournament servers, each bot is run as a separate user 2010-10-24T16:02:49 via ssh 2010-10-24T16:02:52 weird. 2010-10-24T16:02:58 as a form of sandboxing 2010-10-24T16:03:04 why not... setuid adn chroot? 2010-10-24T16:03:09 I don't know why "su" isn't good enough 2010-10-24T16:03:17 maybe because of passwords 2010-10-24T16:03:29 SSH lets you use a key file 2010-10-24T16:03:42 I didn't design all this, I'm just trying to get it to wirk 2010-10-24T16:03:50 su doesn't ask for a password if you run it as root 2010-10-24T16:03:58 but ssh -t looks promising 2010-10-24T16:05:06 Or maybe they could configure sudo 2010-10-24T16:06:35 *** Itkovian has quit IRC (Quit: Itkovian) 2010-10-24T16:07:08 *** Itkovian has joined #aichallenge 2010-10-24T16:07:59 *** Zalma has quit IRC (Ping timeout: 265 seconds) 2010-10-24T16:11:37 Top 10 players: bocsimacko(3965), Hazard(3939), felixcoto(3880), davidjliu(3790), jambachili(3789), sin_sun(3786), cfaftw(3766), RebelXT(3742), luksian(3740), ruilov(3737) 2010-10-24T16:13:47 *** toodlebug has quit IRC (Ping timeout: 265 seconds) 2010-10-24T16:15:43 *** rebelxt has left #aichallenge 2010-10-24T16:16:30 *** Itkovian has quit IRC (Quit: Itkovian) 2010-10-24T16:22:40 *** jklandis has quit IRC (Ping timeout: 250 seconds) 2010-10-24T16:26:48 *** jesionaj has joined #aichallenge 2010-10-24T16:30:48 no any time 2010-10-24T16:37:50 *** boegel has quit IRC (Quit: Leaving) 2010-10-24T16:52:04 *** Todd200 has joined #aichallenge 2010-10-24T16:52:21 hi people 2010-10-24T16:54:19 wow its empty in here 2010-10-24T16:55:47 oh really? 2010-10-24T16:57:22 hey a person! 2010-10-24T16:57:49 i just thought id drop by and check out the ai contest channel 2010-10-24T16:58:17 * Todd200 is still waiting for his ai to win a battle 2010-10-24T16:59:30 *** Appleman1234 has joined #aichallenge 2010-10-24T16:59:58 *** Naktibalda has quit IRC (Remote host closed the connection) 2010-10-24T17:08:42 *** Naktibalda has joined #aichallenge 2010-10-24T17:08:54 * Todd200 is bored 2010-10-24T17:11:31 *** delt0r___ has joined #aichallenge 2010-10-24T17:11:37 Top 10 players: bocsimacko(3964), Hazard(3963), felixcoto(3868), jambachili(3794), sin_sun(3790), davidjliu(3772), cfaftw(3768), luksian(3756), ruilov(3755), RebelXT(3737) 2010-10-24T17:13:50 *** delt0r has quit IRC (Ping timeout: 264 seconds) 2010-10-24T17:23:12 *** phreeza has joined #aichallenge 2010-10-24T17:26:46 *** p4p4 has quit IRC (Quit: ChatZilla 0.9.84 [SeaMonkey 2.0a3/20090223135443]) 2010-10-24T17:32:22 *** mceier has quit IRC (Quit: leaving) 2010-10-24T17:37:57 *** Bobng has quit IRC (Ping timeout: 240 seconds) 2010-10-24T17:54:37 *** Todd200 has left #aichallenge 2010-10-24T18:01:14 *** allsystemsarego has quit IRC (Quit: Leaving) 2010-10-24T18:02:59 *** bhasker has joined #aichallenge 2010-10-24T18:05:54 *** Xrillo has left #aichallenge ("Ex-Chat") 2010-10-24T18:09:15 *** jaspervdj has quit IRC (Quit: NEVER GONNA GIVE YOU UP NEVER GONNA LET YOU DOWN) 2010-10-24T18:09:37 *** fawek has quit IRC (Ping timeout: 264 seconds) 2010-10-24T18:11:39 Top 10 players: bocsimacko(3953), Hazard(3942), felixcoto(3858), sin_sun(3793), jambachili(3791), davidjliu(3769), cfaftw(3750), RebelXT(3738), ruilov(3733), luksian(3723) 2010-10-24T18:17:17 *** RainCT has quit IRC (Remote host closed the connection) 2010-10-24T18:22:38 *** sigh has joined #aichallenge 2010-10-24T18:29:55 *** yasith has quit IRC (Ping timeout: 252 seconds) 2010-10-24T18:39:09 *** jklandis has joined #aichallenge 2010-10-24T18:39:22 *** Naktibalda has quit IRC (Remote host closed the connection) 2010-10-24T18:41:25 *** yasith has joined #aichallenge 2010-10-24T18:48:12 *** jesionaj` has joined #aichallenge 2010-10-24T18:49:48 *** jesionaj has quit IRC (Ping timeout: 265 seconds) 2010-10-24T18:55:46 *** choas has quit IRC (Ping timeout: 276 seconds) 2010-10-24T19:01:19 *** O1athe has joined #aichallenge 2010-10-24T19:02:55 *** Olathe has quit IRC (Ping timeout: 255 seconds) 2010-10-24T19:04:16 *** Mathnerd314 has joined #aichallenge 2010-10-24T19:05:40 *** rommel has joined #aichallenge 2010-10-24T19:06:04 Does anyone know where I can find the source code for playGame.jar? 2010-10-24T19:07:28 *** Sarin has quit IRC (Quit: Verlassend) 2010-10-24T19:08:58 do you know where the repository is? 2010-10-24T19:09:14 no 2010-10-24T19:10:57 http://code.google.com/p/ai-contest/source/browse/ 2010-10-24T19:11:38 Top 10 players: Hazard(3957), bocsimacko(3931), felixcoto(3875), sin_sun(3800), jambachili(3787), davidjliu(3776), cfaftw(3764), RebelXT(3739), luksian(3725), sequoh(3724) 2010-10-24T19:12:05 If you aren't familiar with SVN, start with trunk, and look under planet_wars 2010-10-24T19:13:07 I believe PlayGame.jar is built from the sources under viz 2010-10-24T19:13:13 Thanks 2010-10-24T19:13:30 I think engine.py might also do 2010-10-24T19:13:55 Well engine.py runs on the server, and you will have trouble using it without a bunch of stuff set up 2010-10-24T19:14:29 But maybe you just want to see how it works. 2010-10-24T19:14:32 I'm just looking for some code to look off of so I can resolve battles with my bot 2010-10-24T19:14:37 I don't actually want to run it 2010-10-24T19:15:05 I think backend/engine.py has a function called fight_battle 2010-10-24T19:15:19 I'm looking at it right now 2010-10-24T19:15:22 :) 2010-10-24T19:15:43 *** phreeza has quit IRC (Quit: kthxbai) 2010-10-24T19:27:39 *** Commandir has left #aichallenge 2010-10-24T19:29:11 *** davidjliu_ has joined #aichallenge 2010-10-24T19:30:59 *** davidjliu has quit IRC (Ping timeout: 265 seconds) 2010-10-24T19:38:44 *** jesionaj` has quit IRC (Ping timeout: 265 seconds) 2010-10-24T19:39:42 *** Appleman1234 has quit IRC (Ping timeout: 265 seconds) 2010-10-24T19:41:11 *** Appleman1234 has joined #aichallenge 2010-10-24T19:44:02 *** rommel has quit IRC (Ping timeout: 265 seconds) 2010-10-24T19:44:03 *** jesionaj has joined #aichallenge 2010-10-24T20:04:49 *** dmj111 has quit IRC (Remote host closed the connection) 2010-10-24T20:11:40 Top 10 players: Hazard(3933), bocsimacko(3926), felixcoto(3886), sin_sun(3792), jambachili(3780), davidjliu(3772), cfaftw(3767), RebelXT(3726), luksian(3718), sequoh(3718) 2010-10-24T20:12:49 *** dmj111 has joined #aichallenge 2010-10-24T20:13:37 *** jesionaj` has joined #aichallenge 2010-10-24T20:16:43 *** jesionaj has quit IRC (Ping timeout: 255 seconds) 2010-10-24T20:38:13 What's it called when you have a C++ constructor which has this: Object(int a, int b) : someVar(a), someOtherVar(b) { code };? 2010-10-24T20:40:52 that is an initialization list, i think. 2010-10-24T20:44:27 *** FlagCapper has quit IRC (Ping timeout: 265 seconds) 2010-10-24T20:49:17 *** rebelxt has joined #aichallenge 2010-10-24T21:11:42 Top 10 players: Hazard(3926), bocsimacko(3919), felixcoto(3887), jambachili(3775), sin_sun(3775), davidjliu(3760), cfaftw(3758), Raschi(3724), luksian(3721), RebelXT(3719) 2010-10-24T21:21:25 *** rebelxt has left #aichallenge 2010-10-24T21:26:41 *** Appleman1234 has quit IRC (Excess Flood) 2010-10-24T21:27:36 *** Appleman1234 has joined #aichallenge 2010-10-24T21:36:46 *** Appleman1234 has quit IRC (Excess Flood) 2010-10-24T21:53:15 *** Appleman1234 has joined #aichallenge 2010-10-24T22:05:16 urgh... the optimal next-to-last move is almost as complicated as the entire game 2010-10-24T22:05:43 *** seisatsu has joined #aichallenge 2010-10-24T22:06:27 except that you only consider targets at distance 2 2010-10-24T22:06:35 distance 1, actually 2010-10-24T22:07:04 fleets travel during the turn on which they are launched 2010-10-24T22:07:42 yeah... 2010-10-24T22:09:02 I guess it doesn't matter what happens at the end of the last turn however 2010-10-24T22:09:12 you will have already earned your bonus ships 2010-10-24T22:09:21 the outcome can't affect the score 2010-10-24T22:09:37 actually, it can: you can waste ships on a neutral 2010-10-24T22:11:10 I do not think the map generator allows planets at distance 1 2010-10-24T22:11:26 It would create strange sequencing problems in the game engine 2010-10-24T22:11:40 Top 10 players: Hazard(3925), bocsimacko(3918), felixcoto(3886), jambachili(3774), sin_sun(3774), davidjliu(3759), cfaftw(3757), Raschi(3722), luksian(3720), RebelXT(3716) 2010-10-24T22:12:07 It would be possible to accidentally make an illegal move 2010-10-24T22:12:31 Depending on the order in which the moves get processed 2010-10-24T22:12:44 no... 2010-10-24T22:13:08 fleets sent, then growth, then fleets come back 2010-10-24T22:13:37 read engine.py 2010-10-24T22:15:49 I think you are right 2010-10-24T22:16:09 Still, I do not think planets at distance 1 are allowed 2010-10-24T22:16:25 check the maps :p 2010-10-24T22:17:02 or map_generator.py 2010-10-24T22:17:26 I see a check for dist <= 1 in too_close() 2010-10-24T22:18:34 anyways, I don't care; it is an interesting problem 2010-10-24T22:21:36 for example, if you have one planet connected to lots of neutrals, then it is the 0-1 knapsack problem 2010-10-24T22:26:56 *** Appleman1234 has quit IRC (Ping timeout: 265 seconds) 2010-10-24T22:27:34 but enemies add a whole new dimension :D 2010-10-24T22:28:54 *** Appleman1234 has joined #aichallenge 2010-10-24T22:34:20 are you aware of any simple examples where there is no dominant strategy? 2010-10-24T22:34:27 say with 3 planets? 2010-10-24T22:45:49 *** jesionaj` has quit IRC (Ping timeout: 272 seconds) 2010-10-24T22:47:59 i think mcleopold and jmcarthur have discussed various situations that they believe have no dominant strategy. I did not follow it closely though. Its been in the last week or two. 2010-10-24T22:50:31 dmj111: we always turn up short 2010-10-24T22:51:04 it was at least a couple weeks ago 2010-10-24T22:51:14 i'm not even really participating now. real life beat me down 2010-10-24T22:54:25 ahh. sorry to hear that. I keep trying to step away, but get deluded into thinking I have something else that will work. 2010-10-24T22:56:35 I keep wanting subgame analysis to work 2010-10-24T22:56:47 some maps have these tempting little clusters 2010-10-24T22:59:53 too short-sighted. you're limited to 6-7 moves 2010-10-24T23:00:01 at one point, I tried treating groups of planets I owned that were all closer to each other than any enemy as a "super planet". That way, I could attack/defend as one from them, kind of. 2010-10-24T23:00:36 most of my code assumes the worst from the enemy, and this clustering idea would help mitigate it, but not really enough. 2010-10-24T23:01:36 if I can just get optimal strategy for the next-to-last move, and implement it, I feel as though my bot will win most games 2010-10-24T23:04:21 A lot of the time when playing the game manually I end up thinking "how many ships do I need to send to that region over there to tip the balance?" 2010-10-24T23:04:27 how's everyone? 2010-10-24T23:04:45 I don't know how to make that question precise 2010-10-24T23:08:09 *** antimatroid1 has joined #aichallenge 2010-10-24T23:08:18 jklandis: that is one of the things that I already need to consider 2010-10-24T23:09:16 anyways... back to studies of linear programming 2010-10-24T23:10:26 *** antimatroid has quit IRC (Ping timeout: 250 seconds) 2010-10-24T23:11:46 Top 10 players: Hazard(3920), bocsimacko(3897), felixcoto(3893), jambachili(3769), cfaftw(3755), sin_sun(3752), davidjliu(3744), luksian(3715), RebelXT(3704), sequoh(3691) 2010-10-24T23:17:24 *** tapwater has quit IRC (Quit: tapwater) 2010-10-24T23:21:49 *** jklandis has left #aichallenge 2010-10-24T23:26:27 dmj111: when you assume the worst, how do you prevent it from doing nothing the second it gets behind :P 2010-10-24T23:26:46 i was trying to work out a way to do that, but then realised the enemy would ruin me first turn just by expanding more 2010-10-24T23:36:56 *** jesionaj has joined #aichallenge