User talk:PiRocks

From Robowiki
Revision as of 02:18, 4 July 2010 by PiRocks (talk | contribs)
Jump to navigation Jump to search

Welcome!

Hello, PiRocks, and welcome to RoboWiki! This place contains a wealth information about Robocode, from basic to more advanced. I hope you enjoy creating robots and being a robocoder!

If you are posting a comment on this wiki, please sign your messages using four tildes (--~~~~); this will automatically insert your username and the date stamp. If you are not familiar with MediaWiki, these links might help you out:

If you need help, check out the frequently asked questions or ask it on this page. Again, welcome!

—— RoboWiki Administrators

Greetings and Welcome to the Robowiki, good luck with your bots. I'm curious though... you say "work-a-round method to create more threads". What do you mean precisely by that? To me that sounds like a security bug in the new version in 1.7.2.1 Beta --Rednaxela 04:19, 24 June 2010 (UTC)

My work-a-round mechanism is to create a new ThreadGroup that is Inserted to the main ThreadGroup. Then all threads inserted into this ThreadGroup. All the threads in this group will not be registered by calling enumerate on my robot's ThreadGroup, so it is not Disabled for having too many threads. PiRocks 13:12, 24 June 2010 (UTC)PiRocks.

Nice work! :-) I didn't realize that, so I will give it a try and of course check if the 1.7.2.0 and earlier versions has this problem. I will of course fix this security flaw ASAP before the final version of 1.7.2.1. Keep on hacking. It's a good way to get the security tested in depth. :-) --Fnl 17:16, 25 June 2010 (UTC)
This security breach has now been fixed for the final version of Robocode 1.7.2.1. :-) --Fnl 22:59, 27 June 2010 (UTC)

I believe that you are creating more than five threads? Just a note though, while it is not forbidden, using thread in RoboRumble-participated robot is commonly consider as a time-cheater. Since each robot run in its own thread in a sandboxed, time limited environment, and the thread controlling is done entirely by the OS, using thread will steal other robot processing time. --Nat Pavasant 12:54, 24 June 2010 (UTC)

Not only that, it is my wonder why you would need so much processing time, or so many parallel processes. — Chase-san 14:48, 24 June 2010 (UTC)
The way my robot is supposed to work is that it keeps an accurate reading on every robot in the game. That way it can perform complicated calculations on each robot to attempt to dodge every bullet and have each bullet always hit. Unfortunately for this to work, the data must be updated constantly, so I create a new thread in each scanned event to perform the necessary code, so that more events can be processed. Also there are more threads performing the calculations and a thread preventing concurrency errors. This usually ends up with about 10-20 threads running at a time. Getting my robot disabled in 1.6.1.4, so it is put into last place on the roborumble.PiRocks 01:18, 4 July 2010 (UTC)PiRocks
I have considered removing the option to create more thread in Robocode. However, this will break backwards compatibility. Another option might be to monitor the total CPU time used by the robot by monitoring the CPU usage of all threads of a robot. If the CPU usage is bigger than our CPU constant, then either the robot will be disabled or the thread priorities will be lowered. --Fnl 17:16, 25 June 2010 (UTC)
Is it possible, for now, to set the threads created by robot to the lowest priority? --Nat Pavasant 04:38, 26 June 2010 (UTC)

Robot Being Disabled?

For some reason that I can't figure out, my prototype Destroyer(which doesn't get disabled for reasons stated above, or in other places I can find in the wiki) keeps on getting disabled. No alerts appear in the CMD shell, and only "SYSTEM: Skipping robot: hacker.Destroyer" appears in the robot's output... Why is it being disabled? PiRocks 01:18, 4 July 2010 (UTC) (also, I'm working in 1.6.1.4)

You cannot post new threads to this discussion page because it has been protected from new threads, or you do not currently have permission to edit.

There are no threads on this page yet.