Talk:Main Page

From Robowiki
Jump to navigation Jump to search

Contents

Thread titleRepliesLast modified
Slow RoboWiki205:46, 9 May 2012
EverythingRobocode link214:42, 12 March 2012
Looking for Mentors611:18, 11 January 2012
The downtime this weekend.003:29, 6 December 2011
Slowness317:30, 4 December 2011
RoboRumble result207:26, 15 November 2011
Turbo Boost and Robocode202:23, 13 November 2011
RoboCode Mentors716:13, 11 October 2011
Virtual bullet doesn't line up with real bullets1407:33, 11 October 2011
Saving data between rounds220:56, 6 October 2011
while true loop307:12, 29 September 2011
LiquidThreads1013:56, 6 September 2011
Simplify recent change details from thread005:27, 6 September 2011
Talk from old wiki116:05, 5 September 2011
First page
First page
Next page
Next page
Last page
Last page

Slow RoboWiki

Hi mates. Is there an issue with RoboWiki? It is very slow and sometimes it even didn't responds.

Wompi09:57, 3 May 2012

Yes, I've also noticed this. I suspect a search engine may have been spidering, or perhaps a database backup was running.

Skilgannon17:33, 3 May 2012
 

I as looking into this on the server today, and it looks to me like the main thing loading the wiki down is Bing being ridiculously aggressive with it's spidering... :(

Rednaxela05:46, 9 May 2012
 

EverythingRobocode link

I'm not really seeing anything on EverythingRobocode that makes it worth having a prominent link on the front page. I don't want to seem like I have a problem with other sites about Robocode coming into existence, because I think it's great. If at some point it has a ton of original content, by all means we should link to it. But right now, it looks like just a few articles, and this is a pretty elite set of links. Could you just post a link on your user page for now?

Voidious22:58, 11 March 2012

I agree, we cannot link every page about robocode on the front page, only the most important/informative of them. Compounded the need to add a description as well, which is a bit needless. I will remove it (the link+desc) for now.

Chase-san04:38, 12 March 2012
 

Maybe an External Links page filled links? And then link the Main Page to that page.

MN14:42, 12 March 2012
 

Looking for Mentors

Hi everyone, Im new to this group but am hoping you might be able to help me out with a project I am going to be running at my school this term. I am going to be delivering an introduction to programming for some Yr 9 students (13 - 14 year olds) starting out with basic programming ideas and examples and then moving onto a group project where teams of students create their own robots using robocode. They will have regular competition against each other to see what team is making the most progress / come up with the best ideas.

The reason I am telling you all this is that I am looking for some mentors to help out and perhaps give some advice. All this would involve is you perhaps receiving 1 or 2 emails with some code or some questions about how to do something. This kind of interaction is really useful for students as they get to work with real experts and feel like they are being listened to and treated like adults.

The project will run for about 6 weeks and will start mid february, as I said it would only involve a couple of emails or perhaps a Skype session. The classes are all small and the students are really hard working

I would be very grateful if you would consider helping out and if you have any questions please fell free to get in touch with me.

Thanks for your help,

Darren

Mr Sutton07:45, 6 January 2012

I'm happy to help. I'll be very busy over the next few months getting my project ready for the international Robocup, but the occasional email should be fine.

Skilgannon09:15, 6 January 2012
 

I'm ready to help, but i'm afraid, that my english skill can become a problem

Jdev20:28, 6 January 2012
 

Thanks for the quick reply, its great to hear that people are keen to help out! I guess the best way to move forward would be to share some contact details. I will then give these out to the students once we start the robocode part of our project around the middle of february. Perhaps each of you could mentor a couple of teams therefore limiting the number of emails you will be getting.

It would be great if you could perhaps tell some other people about this project and see if they would also like to help our as the more people we have involved the better!

My email address is dsutton@nlcsjeju.kr, please email me from the account you would like students to contact you at so that I can start putting a list together.

Thanks again for your help and I look forward to hearing from you and perhaps some other willing helpers soon.

Darren

Mr Sutton04:59, 7 January 2012
 

I'd also be glad to help. Projects like this are always interesting :)

Rednaxela05:11, 7 January 2012
 

actually i think that every active robocoder is ready to help. and there are google+ circle for robocode: https://plus.google.com/102023615133629629984/posts?fd=1

Jdev11:05, 7 January 2012
 

Thanks for the great response, I've had quite few replies and am also looking for mentors from other more general programming areas as well. If you think you might like to get involved please contact me and I can tell you all about it.

The students had their first programming lessons this week and are really excited, particularly by the idea of working with robocode and having mentors they will be able to contact and share ideas with.

If you have said you will be involved or would like to be can I ask you to send me a quick Bio about yourself and your experience that I can give to students so they can find out a bit about you. It would also be great if you could supply a picture as well and this could be an avatar if you like, It would be nice if students could put a name to a face!

Thanks again for all your help, if you know of anyone who might be willing and able to help please put them in contact with me.

Darren

Mr Sutton11:18, 11 January 2012
 

The downtime this weekend.

Just for the record, the downtime this weekend was my fault. Got the server into a nasty OOM state when trying to optimize performance. It should be working properly now (and still faster).

Rednaxela03:29, 6 December 2011

If anyone is noticing Robowiki being slow, it's because a PHP process is hitting a cpu bottleneck right now.

The logs are showing Bing and Baidu doing some heavy spidering right now so it could be that... but it could be something else, I'm not 100% sure.

Rednaxela23:14, 3 December 2011

Are you using php-fpm or spawn-fcgi? From my test, the former performs better under heavy load (though I am not sure since I tested it with nginx, not lighttpd; tested with apachebench with wordpress installation)

Nat Pavasant15:50, 4 December 2011

fcgi, however the number of requests per second was fairly modest really, so I doubt that type of overhead was the issue. More likely something on the MediaWiki side was being inefficient on the particular pages being spidered I think.

Rednaxela16:39, 4 December 2011
 

Yay for speedups! :D

I did some tweaking to the server configuration... according to benchmarks I improved things so that Main_Page went from 5.41 requests/second, all the way up to 80.71 requests/second.

Special:RecentChanges improved less though, going from 2.26 requests/second to 3.44 requests/second.

Rednaxela17:30, 4 December 2011
 
 

RoboRumble result

What's the means of "APS","Survival","ELO Rating","Glicko-2(RD)","Battles","Pairings","PL Score" in the RoboRumble?And how to work out them?

Lcya8610:24, 14 November 2011

"APS","ELO Rating","Glicko-2(RD)": Darkcanuck/RRServer/Ratings
Premier League: [1]

Survival - it's average percent of rounds where robot survive
Battles - it's count of battles in which robot takes part
Pairings - it's count of another robots with which robot has battles
PL Score - it's count of wins in pairings (score percent > 50) * 2

for example robot A has 2 battles with robot B with score percents (45, 60) and no battles with robot C. In this case APS will be (45 + 60) / 2 = 52.5; battles will be 2; pairings will be 1; PL Score will be 1 * 2 = 2

Jdev12:20, 14 November 2011
 

soga,thank you ^_^

Lcya8607:17, 15 November 2011
 

Turbo Boost and Robocode

I just switched to a Sandy Bridge computer recently, which I believe has the most aggressive Turbo Boost nowadays (not counting the AMD Bulldozer, which I am not sure). I find that a lot of older robots started to skip turn like crazy (DrussGT is like skip 1 turn every 10 turns). I think the reason is that when Robocode calculate CPU Constant, it concentrates the extreme math to single core, which trigger the boost (to 2.9GHz in my CPU), but when the battle is being run, there are several threads running (plus the CPU temp would be higher due to more calculation being done), so the boost is not triggered, hence the cpu run at base speed (2.0GHz in my case).

Personally I run my Robocode at 1.5x the original CPU Constant. I don't know which CPUs you guys are on, but I think this may be a problem, especially on RoboRumble clients. What do you think? Should I fire a bug report?

Nat Pavasant11:41, 12 November 2011

I don't have such an issue on my AMD box, but that's a very good point. Hmm... --Rednaxela 16:48, 12 November 2011 (UTC)

Rednaxela17:48, 12 November 2011
 

I also have an increased CPU constant, approx 1.5 times the original. Just because I still have a single core P4 and sometimes I want to do something without stopping my client. It does not seem to hurt anyway.

GrubbmGait02:23, 13 November 2011
 

RoboCode Mentors

I'm new to robocode, and the learning curve is quite steep.

To phrase that another way, at one point my robot was locking on quite nicely to other robots, but subsequent versions (and prior versions) never appear to do anything sensible.

I'm an experienced programmer with lots of C and a bit of Java under my belt, so it's not the programming I'm struggling with.

I can get help with the specific physics questions (how do you get the angle between two headings? for example), so it's not that either.

I really just need someone who I can fire off a question "what does this do?" or "how does this work?" and get a simple response or a link to a wiki page.

I think if some sort of "big brother" mentorship programme were set up, a lot of people who would otherwise be put off by the massive learning curve might be encouraged to join in. More robots = more challenge = more fun. Right? :)

Until such a programme is set up, is there anybody out there who'd like to take a newbie under their wing? Please? :)

Cbrowne23:37, 10 October 2011

I would say just make yourself at home on the wiki and post all the questions you like. You'll probably get better / faster responses giving everyone a chance to answer them. Most of us watch Recent Changes and are happy to help. =) I'd also love to hear what kind of intro / tutorial pages would have been helpful to you, once you get your footing.

Welcome to the RoboWiki!

Voidious01:58, 11 October 2011
 

Yeah, just ask away. If you're not sure where to ask, just ask on your user page. It also helps if you keep some sort of documentation of what you're doing, it doesn't have to be fancy, but more like a changelog - it makes it easier for us to give suggestions. I'd think that the majority of the stuff is already here on the wiki, but knowing what to call it and where it is needs a bit of experience =). Fresh blood is always appreciated! So go wild with the questions.

Skilgannon07:32, 11 October 2011
 

Ok, I guess the format of the Wiki and the highly-conversational style are throwing me a bit. I wasn't expecting a response so quickly (or at all, for that matter).

I think a brief primer on the physics/maths calculations you'll need for robocode would be useful, eg:

- how to calculate the difference between two headings
- how to calculate the relative velocity of another bot vs your bot (don't know if this is used in any of the 'top' algorithms, but it feels like it could be useful to newbie bot authors)
- how/why to normalise headings to relative angles (I know the Utils class has this, but it would be useful for newbie bot developers to know how to do it themselves and why it's useful)
- how to calculate the distance between two headings (subtle difference between this and the first point)

If this already exists, could someone point me in the right direction?

Cbrowne14:04, 11 October 2011
 

I'm not sure if this is covered explicitly anywhere - I know for all of the geometry problems I run into I sketch it on paper then solve it traditionally.

That said, the difference between two headings is just (scan1 - scan2). You might want to use normalisation - either relative or absolute - to put it in the range you want.

On this wiki we generally refer to relative velocity in terms of its components - Lateral_Velocity and Advancing_Velocity. The pages for those explain how to calculate them, and yes, they are used in a lot of the more advanced algorithms =)

Relative normalisation is used for determining how far something is to the left or right - for instance, whether you should turn your gun left or right. It puts the angle between -Pi and +Pi (or -180 and +180). Absolute normalisation is usually used to figure out where something is 'relative to North' and gives a value between 0 and 2*Pi (or 0 and 360).

As to your last question, I'm not sure exactly what you're asking. Perhaps you want the absolute value of the heading difference? If so, take the relative normal angle first so you don't get the situation where one is on 355 degrees and the other 5 degrees, and the difference between them is 350 degrees instead of 10.

Skilgannon15:03, 11 October 2011
 

scan1-scan2 is over-simplified, if you want the -shortest- difference between the two headings, which is more useful, it should be: `360 - Math.max(scan1,scan2) + Math.min(scan1,scan2)` I think. Different when dealing in radians (obviously).

The last question is a little difficult to phrase, but no I'm not talking about the absolute value of the heading difference. I'm talking about calculating the distance between two points on two given headings. Using trigonometry. Eg "where is the bullet the robot I just scanned just fired? if he fired one", I know this specific example is impossible to model exactly, but for modelling best-guesses of enemies' guns I would imagine this kind of equation would come in handy.

Thanks for the links to Lateral and Advancing Velocities, it makes sense that they're used a lot in the more advanced algorithms, but those algorithms are all pretty much magic to me at the moment so I had absolutely no idea what is and isn't used.

I'm also not asking for specific answers to these questions, just asking if it might be wise to set up a wiki page that has some basic physics for the purposes of other newbies who don't have answers to the questions (I do, because my dad teaches A-level physics). But thanks for your answers nonetheless, as they did help clarify one or two points I wasn't sure about. :)

Cbrowne15:41, 11 October 2011
 

I'd take the difference, then normalise it relatively and take the absolute value.

As for the other one, you probably want to look at projecting a point from an origin location, a certain distance at a certain angle. If you look in the source of Raiko (or pretty much any other open source bot) you'll see the 'project' function. Once you have the new location of the point, you can calculate the distance the normal way, sqrt((x1-x2)^2 + (y1 - y2)^2).

Skilgannon16:11, 11 October 2011
 

Oh, and if you want to have a starting point for more advanced algorithms, I suggest Pattern_Matching. It's what I started with, and it makes a good introduction =)

Skilgannon16:13, 11 October 2011
 

Virtual bullet doesn't line up with real bullets

I have a virtual gun that fires a virtual bullet, for some reason it's just slightly off when i actually fire.

MisalignedVirtualBullet.png

What's the proper way to align and fire? I think my timing is just off.

Ultimatebuster22:56, 3 October 2011

I would guess this is the result of the Robocode idiosyncrasy where a bullet is fired before the gun is turned (so if you do setTurnGunRightDegrees(10), setFire(3), execute(), the bullet is fired before the gun is turned right 10 degrees). So your actual aim is probably the aim from the previous turn, while your predicted is from the current turn.

Skotty23:28, 3 October 2011
 

Well... can't really tell without more information what's wrong, but my first guess about what's wrong, is that perhaps you're not accounting for how within a tick, firing happens before gun turning does. The angle you fire at when you call setFire() is the angle resulting from the prior tick's setTurnGun() type call.

Rednaxela23:28, 3 October 2011
 

Yeah that's correct, the setFire is from the last tick.

What's a typical pattern for robocode as to code placement? I'm currently placing the gun turning code in the while true loop and the firing code in onScannedRobot

and it's wrapped with if (getGunHeat() == 0.0)

Should I change that layout? (also add && getGunTurnRemaining() == 0.0 to the fire wrap?)

Ultimatebuster02:03, 4 October 2011
 

Using onScannedRobot or run is totally just a matter of preference - for 1v1 it won't make any difference, really. It could also be an off-by-1 error in the bullet source location - it should be your location on the tick you called setFire. Or your target angle was farther than your gun could move during that tick, in which case the getGunTurnRemaining == 0 check would solve it.

Voidious02:18, 4 October 2011
 

I know if i combined the 2 logics in 1 function, the code would fail (for me at least) Nevermind i figured it out.

(Also Voidious: I'm testing my bot against yours now because it has pretty debugging graphics and I can see my weaknesses :P Also I perform better against your bot (diamond) if i don't fire :P)

Ultimatebuster02:58, 4 October 2011
 

Also, am I suppose to, with my virtual guns, determine the fire direction using last tick's information, since gun turns after bullet fires...

Right now this would f with my simulated hit rate, as sometimes a bullet might hit but not a virtual bullet, or vice versa.

Ultimatebuster03:25, 4 October 2011
 

Yep, you should, though the impact is probably quite minor.

Voidious04:48, 4 October 2011
 

Hm. Even last turn's angle doesn't match with the actual fired one. Idk what's going on, also I think the virtual bullets also hits better..

Anyway to compensate the gun turn after the bullet fire?

Ultimatebuster17:15, 4 October 2011
 

My bullets were not lined up either, until in March this year, I finally solved the problem with GresSuffurd 0.2.28. It turned out that when using the estimated bearing of the next tick (firing tick) position iso the bearing this tick (aiming tick), my real bullets indeed lined up with my (correct) virtual bullets. It gained me 0.2 APS, but I reached spot #11 with slightly misaligned bullets, so it is really not that important. Also keep in mind you have to aim at the opponents next tick position.

GrubbmGait23:39, 4 October 2011
 

Wait i'm not sure if i understand what you mean by the next tick's position. How do I accomplish that?

Here's what I roughly have:

   while (true){
       if (getGunHeat() == 0.0){
           fireVirtualBullet(enemyCurrentAbsoluteBearing); // Just use Head on targeting as an example because it's simple
           fire(2);
       }
   
       turnGunRightRadians(enemyRelativeGunHeading);
   }

I know this would be wrong. I just don't know how to fix it =S

Ultimatebuster04:03, 5 October 2011
 

He means something like:

Point2D.Double myNextLocation = project(myLocation,getVelocity(),getHeadingRadians());
Point2D.Double enemyNextLocation = project(enemyLocation,e.getVelocity(),e.getHeadingRadians());
double nextAbsBearing = absoluteBearing(myNextLocation,enemyNextLocation);

I've tried this, and using it to predict the enemy location didn't help me, although it did help for my own location. I think it depends on the way you define wave hits and starting locations in your gun. In DrussGT I wait until my gun-turn remaining at the beginning of the tick is 0, then fire. I put my bullet on the wave from last tick. As long as you make the same assumptions everywhere it should be ok.

Skilgannon06:21, 5 October 2011
 

Yeah that doesn't help me either, predicting my next location and then aiming via that doesn't make it line up either. I also wait until gun turn is complete.... Still not aligning..

Also, how does bullets collision work? I thought it's a line segment that's between last tick's location and this tick's location (length of the velocity). Whatever the line segment intersect will be collided (other bullet lines or robots)

Ultimatebuster15:10, 5 October 2011

Maybe try staying still while shooting to see if that is the problem? If it still doesn't line up, it is some sort of gun alignment issue.

Skilgannon07:33, 11 October 2011
 

Yes, that is how bullet collisions work. Maybe take your last aim and align the bullet to that? What I do is mark my previous wave as having a bullet the moment setFireBullet() returns a non-null result.

Skilgannon16:40, 5 October 2011
 

Saving data between rounds

Can I save data between rounds in the static variables of other classes other than my main robot class?

Ultimatebuster20:45, 6 October 2011

Yep. Anything that's static will stick around in any class.

Personally, I model most of my stuff so the main robot class has objects that are static (gun, movement, etc) and then everything else is non-static in those classes, but you can model it however you'd like.

Voidious20:55, 6 October 2011
 

Yes.

Skotty20:56, 6 October 2011
 

while true loop

How is the while (true) loop actually broken down? Does robocode executes the code there 1 iteration per turn? Or..?

Ultimatebuster20:49, 28 September 2011

Generally, yes - when you call execute(), the Robocode engine processes one tick, including firing all the events on your bot, and then your run() method continues executing. So most of us have an infinite loop that calls execute() at the end, and each iteration is one tick.

But there's no magic to it - you could have a run method that goes:

public void run() {
  turnRight(20);
  ahead(100);
  fire(3);
}

And that would be perfectly valid. Or you could call execute() every third iteration of your loop. In Dookious, my run method used to have a loop that was while (notWonYet) ..., then a victory dance.

Voidious22:00, 28 September 2011
 

The timing thing for me is very confusing...

For example, if i want to fire at a certain angle, i have to rotate to it.. by the time i do.. i have another angle... which requires more rotation.. etc..

Same thing for turning the robot and going ahead.. I never know how to correctly time them. (Effectively stuck)

Ultimatebuster00:36, 29 September 2011
 

For gun aiming, see Robocode/Game_Physics#Firing_Pitfall. This can cause your aim to be a tick behind. I think most robots don't worry about it. But if you do worry about it, what I do is predict robot positions 1 tick into the future and use that for aiming. It's not exact, but works well enough for me.

Skotty07:11, 29 September 2011
 

LiquidThreads

Just installed LiquidThreads... Hope we all dig it. =)

Voidious18:41, 3 September 2011

We might!

Chase-san19:39, 3 September 2011
 

Liquid threads are kind of better, but still not ideal. My main concern is that this still requires you to go to different pages, some are difficult to get to (have to know it specifically or get refered). For example, if someone were to ask a question/start a discussion on certain type of targeting etc.

Personally I think a forum works the best, as it can break things down into different categories and list everything out in a manageable fashion.

The Facebook group is good, but it lacks the community involvement, in my opinion.

Google+ seems cool, but I can't sign up for it with my Google Apps account..

... and who uses yahoo? :P

Ultimatebuster02:17, 5 September 2011

That's what the Special:RecentChanges is for - you can see modifications made anywhere on the wiki. Questions can be asked on the person's homepage and moved later, if necessary.

Skilgannon11:39, 5 September 2011
 

It will take a while to get used to. But there is no need to diff the discussion pages anymore. Neither convert local times to UCT every time I write something. Nice work.

MN02:59, 5 September 2011

Just doing 4 tildas (~) will automatically do a UTC timestamp, plus signature.

Skilgannon09:40, 5 September 2011
 

I have only one complain. LiquidThreads is polluting the Recent Changes page.

MN03:03, 5 September 2011
 

Ultimatebuster: With regards to a forum, personally the problem I would have with a traditional one, is that conversations are often with regards to a specific concept that either has or should have it's own wiki page anyway. The tight linkage between pages and talk pages encourages cross-pollination between the two sides, with discussion inspiring wiki pages and wiki pages inspiring discussion. Plus, I feel that the categories that would be created in a normal forum would be too broad for robocode and cronological sorting within such large groups too limiting.

Rednaxela06:12, 5 September 2011
 

A forum would be much more open for beginners to ask questions though. you shouldn't try to put everything into categories but just leave it to different threads in topics. --Peltco 06:15, 5 September 2011 (UTC)

Peltco07:15, 5 September 2011
 

Maybe it would make sense to have a page using liquidthreads which is specifically for asking questions when a specific page is not known? Perhaps do something like prominently link it from the main page, or even embed it?

Rednaxela16:43, 5 September 2011
 

Well, although beginners may not know, but I believe with our not-so-large community you can ask questions on almost any talk page, and if it seems inappropriate, someone will move the conversation to the right place. I really think we should have a bot that post welcome message to user, since IIRC it tells that you can ask question on your talk page.

Nat Pavasant13:56, 6 September 2011
 

Simplify recent change details from thread

Basically reduce the amount of data from the post that is set in the recent changes area. Lots of it has been wrapping, and that makes it harder to read. If possible half of what it has now. If possible even a "ABC has replied to thread XYZ". ;)

Chase-san05:27, 6 September 2011

Talk from old wiki

Personally, I think with the LiquidThread installed, every talk from old wiki should be put into the Archived talk namespace, or discussion header. My main reason is that discussion from old wiki would be uing old-style link, and I don't know how to programme a wikibot to edit a LiquidThread (plus my old converting code would work with the discussion header without modification)

Nat Pavasant11:27, 5 September 2011

I don't like leaving conversations in the discussion header, since it pushes the LiquidThreads stuff way down the page and I don't think that's what he header is for. I think moving to Archived talk is appropriate in most places, and you can just link to it in the header (like I did in Talk:Main Page).

I'm not sure how to deal with current conversations on the new wiki. I don't want them in the header. Archiving them is OK in most places, and maybe we could do it with a bot, but it feels pretty drastic to do it across the whole wiki. I wish I could just convert them to LiquidThreads conversations...

Voidious16:05, 5 September 2011
 
First page
First page
Next page
Next page
Last page
Last page