reset password
Author Message
serpent
Posts: 43
Posted 23:01 Nov 19, 2012 |

Is this the TCP server thing you tried last year?

 https://github.com/berak/ants-tcp/downloads

I ran it and it runs but I haven't test bots on it. the readme.txt said just to run the:

*  tcpserver.py (to run the games), as well as 

 * webserver.py (to show the results to the outer world).
Attachments:
rabbott
Posts: 1649
Posted 23:28 Nov 19, 2012 |

Sounds like it. Fernando said he was unable to get it running.

How far did you get? The most important thing is to generate and run random games among uploaded bots and store the results. Do you know how to do that?

Besides that there must be some way (a) to upload bots and (b) to run a TrueSkill analysis on the game results.

If you can get those pieces working, that would be great!

serpent
Posts: 43
Posted 13:12 Nov 20, 2012 |

I was able to run both the tcp and web servers. you need to be run python 2.72 i think i tried it with 3.3 and it did not work.

Last edited by serpent at 13:12 Nov 20, 2012.
serpent
Posts: 43
Posted 13:30 Nov 20, 2012 |

 here a screen shot of of me add to the rankings on my server.

Attachments:
serpent
Posts: 43
Posted 13:30 Nov 20, 2012 |

 here a screen shot of of me add to the rankings on my server.

Attachments:
serpent
Posts: 43
Posted 13:38 Nov 20, 2012 |

Here is me and endoma bot with rankings after one game

serpent
Posts: 43
Posted 13:47 Nov 20, 2012 |

So it works do I get an A++. heheh.   :)

So to get it to work install python 2.72 86x version

install and setup IIS with CGI.

install php 5.3 with fastCGI. 

run tcpserver.py and webserver.py

create cmd with

python tcpclient.py host_ulr 2081 "python MyBot .py" username password [num_rounds]

replace host_ulr with the server ip or ulr

the python bot with the bot you want to use and chose a username and password to use for the ranking 

and the num of rounds to run.

you can see my server at http://home888.myq-see.com:2080/

Last edited by rabbott at 14:20 Nov 20, 2012.
rabbott
Posts: 1649
Posted 14:21 Nov 20, 2012 |

 

Would you be willing to work with Fernando to get it running on the school server?  A++ if you do.

serpent
Posts: 43
Posted 14:44 Nov 20, 2012 |

Sent Fernando an email will all the links and files I used to get it running. Also as a side note you don't upload bots. it run off the machine it is on and communicates with the server to play games and ranks it. Just FYI.

Last edited by serpent at 14:49 Nov 20, 2012.
serpent
Posts: 43
Posted 14:57 Nov 20, 2012 |

Fernado is gone until Nov 26 I cc  Yin Tam.

rabbott
Posts: 1649
Posted 18:20 Nov 20, 2012 |

We'll see what happens.  During the contest, they had a means for uploading bots. That's how they kept track of the entrants.

serpent
Posts: 43
Posted 12:04 Nov 21, 2012 |

We can just use this one and run it on one machine. It can run Skills in java or python which would already be on the machine and call localhost to run the bots. It can take a while to get a stable rank so we might not get a stable rank if all ant are near the same skill level if we run it only for 3 or so hours. 3 hour is about 15-30 or so games.

Attachments:
rabbott
Posts: 1649
Posted 16:18 Nov 21, 2012 |

Tell me how it would work. What would be installed on which machine(s). How will the bots be loaded onto the machine with the game engine? What ties it all together so that you get a final ranking?

serpent
Posts: 43
Posted 17:13 Nov 21, 2012 |

It would run with all the bots we have (everyone's bots) and it would be best to have a couple of copies of the same bot running at the same time to have more random matches. This is because if only on is running the it is likely that they will play the same opponents again as the would finish a game and the only available bot is the one that also just finished. The server would take bots that are connected to it and play games with them randomly and start to build a skill score the long it is run the more accurate it is. And it seem more like 20 game or so in per hour depending on factors like the game settings and the maps that are played. You can look at my server I ran it for a while to see if my old bot do better than my new bots.

rabbott
Posts: 1649
Posted 19:16 Nov 21, 2012 |

I appreciate your spending time investigating this. I'm still not sure how it would work, though.

Would we run it on your computer? (Or on mine? Or on a school server?)

How would the bots be entered? Would you (or I) have to do that manually?

Once all the bots are loaded, is there anything else to do other than issuing a command for it to start?

After that do you just look at the results periodically to see how they are working out? That is, will it just keep running games indefinitely and automatically revise the skill scores after each game?

serpent
Posts: 43
Posted 20:53 Nov 21, 2012 |

Any computer would work (just need python installed and setup and java for the java bots and for the jskill if you don't want to use the pyskill )and you could run each bot on the same machine or you can just have them load the bots themselves from there own machine but they would need to download the client you see at the top of the page (server webpage eg client.py) for the version of python that the game is running on also you would need the ip or ulr the server is on. you issue a command to connect to the server using a cmd file and in it tell the server how many game you want to run or have it run indefinitely and the server will match up the bots and pick random maps to be played and score each bot and update the skill score after each game. You can also see the replays on the server. So yes after the bot are connected to the server and if the run indefinitely you can just check it from time to time to see who is in the lead and if you want see replay of the matches played. The computer the bot are on would see the games running in the command prompt and it would need to stay open just like if it was running normally.

note: It might not be as fair if we load the bots for our own machine as processing and connect speed maybe different.

Last edited by serpent at 20:57 Nov 21, 2012.
rabbott
Posts: 1649
Posted 22:48 Nov 21, 2012 |

I got lost in the middle of your description.  Let's say we install the software on a school server.

Question 1. How do the bots get onto that server?

Question 2. After they are all on the school server. Can I then issue a single remote command and have the system arrange for all the bots to play multiple games against each other.with no further commands?

Question 3. If so, can I just leave it running? Will the system continue to arrange games and compute skill scores until I stop it?

Question 4. If so, can we access the scores via a web page?

 

serpent
Posts: 43
Posted 09:38 Nov 22, 2012 |

 Question 1. How do the bots get onto that server?

You would have to put download them there if you wanted them to run off the server. How you would do that I don't know.
 
 Question 2. After they are all on the school server. Can I then issue a single remote command and have the system arrange for all the bots to play multiple games against each other.with no further commands?
 
As far as I know no there is not remote command for the server only a command like python client.py bot port# username password numrounds that load the bot to run through a TCP connection. So if the Bots are on the server we would need to start this command on the server for the bots some how. As for the multiple game that is possible.
 
 Question 3. If so, can I just leave it running? Will the system continue to arrange games and compute skill scores until I stop it?
 
Yes and yes.
 
Question 4. If so, can we access the scores via a web page?
 
Yes the web page is the webserver.py just run that and you will be able the view scores.
 
 
 
 
 
 
 
rabbott
Posts: 1649
Posted 09:48 Nov 22, 2012 |

So it sounds like using a school server is not the best way to go. (In the contest itself there was a web page where bots could be uploaded.  Once uploaded, they automatically ran tests first before running them in games. I guess this version doesn't support that.)

I guess I could run it on my computer when I'm not doing anything else. That would work.  If I bring my computer in next Saturday would you help set it up?  We'll download the bots that have been uploaded to the Dropbox by class time Saturday and get it started. Is there an easy way to bulk transfer the rankings web page and the game replay files somewhere so that they can be accessed remotely? 

Last edited by rabbott at 09:49 Nov 22, 2012.