Tuesday, May 19, 2009

Deadlines Have come and passed so how did the project go?

As I write this it has been a week since I submitted my project. What was achieved? Originally it was envisaged that this project would lead to the making of an Agent Factory based RoboCup Team. This task proved to be very optimistic considering the approach that I took. What has been produced is in fact a framework which can be added to in the future. The basic framework is there now for me or anybody else to carry on the project. All that is required is some AI for the players. This team will never be a successful a RoboCup until a few issues are addressed. Firstly synchronization in Agent Factory is quite tough to do and this would need to be looked into by Rem to see how best to change Agent Factory to accommodate this. The next thing is a Coach although while not necessary some AI methods may require the information it could provide. However if you feel like having a go at making a team the source code for the framework as well as the Project Report will be up on www.agentfactory.com in the coming weeks.

Saturday, April 25, 2009

Seriously WTF!!!!!

So the parser was breaking when i saw other players which was funny as it showed a problem with the parser for everything i need to offset the token iterator by +1 so as to land on the right part of the array :(

Wednesday, April 22, 2009

Very Impressed with Rem and Agent Factory

So first off big thanks to my Supervior Dr Rem Collier he was superb today at getting me sorted with agent factory. We now have 22 agents on the pitch in agent factory shame they don;t really have a brain :P Anyways bed is calling much to be done tomorrow think i'll help my agent know where exactly they are.

Monday, April 20, 2009

Location System Update

Have all the see objects stored in the format i want just playing around with priority queues at the minute and as soon as they are fixed the location system should be up and running.

Sunday, April 12, 2009

Mutli Threaded success

Woot Woot success I have my threaded client done I can now decode and send commands at the same time.

Networking solved

So I was trying to get my player to send commands to the server other than the init ones when I stumbled across an issue I had not yet encountered. A brief search of the news file and it turns out soccer server uses a dedicated socket for each client. A simple packet.getPort() command on the first packet I receive from the server after I initialise the client resolved the issue so my client is now on the pitch. I need to make the multi threaded client so as I can move around a bit. In good news the clients parser is working great. Need to get the location nailed down now and it will be a good day.

Tuesday, April 7, 2009

Think i have cracked my location system

So after many pieces of paper I have the outline for my location system. I need to keep track of my head and body angle and then using these angles I can then calculate mine and an object I see location via triangulation. Again several conditionals will be needed to drive this system. Eg is the reference point on a sideline or an endline. is it too the left of centre or right of center etc. Gonna draw them up now and then write the sudo code and then implement the code. Wish me luck. Just need to decide whether its easier to locate the seen object using me as the refernece essentially the 0,0 then translating the vlaues into world co-ordinates or if I should just try get world co-ords from the object striaght away. Suppose a little more maths is called for :(

Sunday, March 29, 2009

So how do I want to view the world

My head is melted at the minute trying to decide how I want my players to see the world. I suppose for simpleness I should just use some form of priority queue for players and pass to the closest player or shoot at goal whichever is possible at the present time but my mind keeps thinking about 3-4 steps from where I am at the minute. Think i just need to make a client that can actually kick a ball by himself and worry about the more complex stuff later on in the week.

Friday, March 27, 2009

Parser Bug FIXED

Finally found the problem preventing me from fully using the parser. Firstly I never accounted for the initial value in my big splitter method so I was getting an out of bounds exception so I just start to extract info from position 1 in the array of tokens rather than position 0 which had the type of command the server had sent in there. Once that was sorted I stumbled across another error as I use string.startswith("blah blah") in certain cases I would have a class where I was checking to see if a token began with blah and then with blah blah so it would never get to the blah blah part. Anyways nesting the two into one check worked great and so now my parser is fully done

Monday, March 16, 2009

Exams are comin :(

So i did my interim report about 2 weeks ago and at the minute i'm doing exams. From the end of next week on though it will be all project all the time till the May 7th deadline. I best get my coding hat on so.

Friday, February 27, 2009

Interim Report Update

Met Rem today got 4 previous interim reports off him seems a very managable report. Rem want roughly 2 page intro 2 pages on agents 2 pages on agent factory and 2 pages on soccer server. Then 2 pages on What my plan for the rest of the project is. Limited to 10 pages :( Could do with more space.

Triangulation - whoever invented it deserves a medal

http://en.wikipedia.org/wiki/Triangulation what a superb site. Have been wondering how to get a decent method of locating my agents on the soccer pitch and have know the answer lay in trigonometry and after much looking I happened upon this gem of a wiki page that answered all my questions. Woot woot now to fix the parsers bugs so I can proceed to getting my locating on

Thursday, February 26, 2009

Interim Report Time :(

So since I last blogged a few things have happened. I have finished the text parser just doing the debugging now. I'm working on agent location and movements at the minute. Trying to find out how to best locate the player in the world. Other than that no real concrete progress has been made. I have to admit to a little bit of slacking off and doing other assignments rather than project work. Had a meeting with Rem a week or two ago where we talked about the agent and how we would like to do things was good took some good notes. We talked about how the project is more complicated than we first thought but hopefully I can lay a good foundation to enable some other student to take a crack at making a more complex agent team next year. Showed Rem how the server works and all in all a good meeting was had. Have one tomorrow. Interim report is due next Friday so the plan is to find out what goes into one tomorrow and then do a first draft over the weekend. Supposed to be 10 pages will easily fill that quota. Could fill 10 pages talking about the Soccer Server ffs. Project has turned out to be very complex. By committing to building my own implementation of things like the message parser etc I have taken on a lot of work some of which is very complicated. Hopefully once I get the report out of the way March will prove to be a more productive month. Plan at the minute is to get a draft of the reort done by Monday and sort out the text parser once and for all over the weekend. Gotta get all the kinks ironed out.

Saturday, February 7, 2009

Needed SVN or CVS now i have both!!

SO i needed to get some svn or cvs on to backup my code and also to allow me to work on it on my tiptop in windows and linux and not need to do stupid usb backups. So i set up a Surce Fordge account and registered my project. Source Fordge gave me access to cvs woot woot. 20 mins after i had been given cvs by Source Fordge my Supervisor emailed me and said i could now use the svn that agent factory has on source fordge. So the plan now is to use my cvs for my random test code and the agent factory svn for what i would call propper code backup. Eg stuff that works and not little test programs designed for experimentation purposes.

Thursday, February 5, 2009

I love Binary Chop :D

So i finally tackled the big "server_param" message. It contains 153 variables so my first approach was to just make 153 if/else statements and use a for loop and the java string splitter as mentioned before. This turned out to be 11,781 operations which is not good. I'm sure it would work but i couldn't leave it like that so i decided to use binary chop and then sort by most occurences. This has brought the parsing down to at most 20*153 which is 3060 opperations but as this is worst case and we have sorted according to higher occurances it will be signifigantly less which is a saving of a lot of opperations. I'm sure i could get this down to 153 operations but my current method will allow for my method to be easily adjusted to handle future "server_param" messages which may have been reordered or even extended. Just have to get the "see" and "sense_body" game time messages done now, I am going to look into recursion for them as they need to be uber fast.

Tuesday, February 3, 2009

Soooo how exactly do i move and Stuff?????

So it would appear that this week I have again delayed my basic agent factory agent making (really need to start doing that soon) and have instead decided on looking into how people make players do stuff lick dribble and pass to a team mate. My current approach is to make all the Java methods to do these basic and non basic movements so that when its time to agent it up I can just use them as actuators in my agent factory agent. One of the perks of how agent factory is designed may I add. Anyways off I go to see how other people have approached my task.

Wednesday, January 28, 2009

Synchronization

So I've been wondering about this for a while as to how I can get my agent to not send to many messages to the server and I have been reading a masters thesis of Remco de Boer & Jelle Kok who made the team UvA Trilearn and they have gone into great detail as to how to do this. They have all sorts of timed tests and they examine all the pitfalls of each. Its very clever, I might check out more thesis' mentioned in this thesis but at the minute I would be fairly happy with using one of the two approached they have out lined. It seems most people who are trying to make there team recommend using UvA Trilearn as a basis for low level stuff such as kicking dribbling etc; and then putting your own high level AI on top of it. So I'm going to use them as a base for making my agent factory agents work. Just a little note for myself Chapter 5 of the thesis for the Synchronization stuff its all highlighted :P

Saturday, January 17, 2009

All not going well :(

So i have been messing around trying to make a Java client and i have message splitting and command construction down. I have yet to make them all play nice. I have just found out where to find out about all the latest updates for the soccer server it is located in the NEWS file that comes bundled with the install. I plan to review this take not of all changes and then see where I go. I think I need to take baby steps and ignore stuff like complex location calculations and what not and focus on getting 11 clients to run around and kick the ball to each other. I'm getting lost in all the flashy difficult things that I will require later. In other news I seriously need to get the finger out over the next two weeks.

Sunday, January 4, 2009

A splitting SUCCESS :)

So I have now managed to split the server messages using the string split method. Was relatively painless as once I described how the messages were to be split the split command worked flawlessly. My next problem is to make a splitter for every type of message the server sends. I also need to examine if my current approach will provide me with enough performance when in full use in my client program. I think I shall do some timed stress tests.