Questions tagged [robocode]

Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen.

Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen.

74 questions
1
vote
1 answer

NullPointerException when writing to a file in Robocode

I get NullPointerException while trying to write to a file: RobocodeFileWriter fileWriter=new RobocodeFileWriter("test.txt"); for (int i = 0; i < state.countstates; i++) for (int j = 0; j < state.countactions; j++) …
Pooya
  • 399
  • 2
  • 13
1
vote
2 answers

Going to the center of the map in robocode

I am trying to go to the center of the map directly. So this means no turning to the center of the map height, then the center of the map width, I want to start and face the center and go there. Once I am there, I want to stop. I feel like what I…
Freiermuth
  • 133
  • 4
  • 15
1
vote
1 answer

How can I get a RobotState of my robot?

Do you know, how can I get a RobotState of my robot in Robocode? I would like to get an information for example, if my robot is active, alive, dead etc. In debug mode is it possible to see that information, but how can I get this in my code?
Kris
  • 1,538
  • 2
  • 16
  • 27
1
vote
1 answer

Fibonacci Spiral - Robocode

Does anyone know how I could make a spiral motion following the Fibonacci pattern around a point in Robocode? I have methods like setTurnRight (double), setAhead (double), getX () and getY (). I tried to make a simple spiral, without the required…
Lucas Cleto
  • 195
  • 1
  • 16
1
vote
1 answer

Robocode (java): how can I make my robot change color depending on the result of getEnergy()?

So I've been working on this robot in Robocode, and I want it to change its color based on the result of the command getEnergy() However, I can't seem to get it to work. The java code I have created is the following: getEnergy(); …
Tanno
  • 93
  • 1
  • 5
1
vote
1 answer

Java: How can I assemble/create a single instance for classification using a Weka generated model?

I've been searching for an answer to this for a while to no avail. First a bit of background: I'm trying to create an AI for robocode using Weka. I'm first logging the required data from a manual robot to an ARFF file, this is working as it…
voodoo172
  • 21
  • 5
1
vote
2 answers

explanation of a wave

I just started experimenting with Robocode and read about waves: http://robowiki.net/wiki/Wave what I don't understand is, why circles are used here. i mean, when I shoot a bullet I only shoot it in one single direction and not in every direction as…
Julian
  • 61
  • 4
1
vote
2 answers

Version control to manage club project?

At my school, we're starting a coding competition for our CS club to help out our freshmen learn the practices of fast turn around times, due dates, code comparison, and API documentation using Robocode. I was wondering if there was a way to allow…
user177466
0
votes
4 answers

Java Create Configuration-like File

I am using Robocode to develop GA tanks that evolve to give better performance (achieving highest fitness levels) and in order to do that I need to store information about each tank in one file. The class Tank will have several variables such…
Stefan Dunn
  • 5,363
  • 7
  • 48
  • 84
0
votes
0 answers

I used python library of rpaframework to to open browser using function open_available browser

Traceback (most recent call last): File "C:\Users\MinMagar\AppData\Local\quickrpa\robot\a68f6186-1d0b-407f-b92d-fe0f04291f4f\QuickShorts-NewsScraper\app\sites\NavBharatTimes.py", line 67, in main self.setup() File…
0
votes
0 answers

Robocode does not run

I downloaded Robocode installation package from Sourceforge and installed it in command promt but when I click on the shorcut on my desktop screen, it prompts out a message in terminal I have tried to search for the solution and most answers are…
0
votes
0 answers

I need help to put and share a code on gitlab

Hello i made a project wit my gr package CTJ; import robocode.*; /**/ public class Firsty extends Robot { public static final int MAX_HITS = 3; public static final int TIMER = 3; double lastBearing = 0; int…
0
votes
1 answer

What class should I import for get keyword in robocode

I am fairly new to robocode and as I was compiling I kept running into errors with the set and get. I was following a tutorial and it worked great in the tutorial however its not working on my PC public void run() { …
IPCZ
  • 21
  • 5
0
votes
0 answers

Error in Visual Studio Code : robot.resolveinterpreter not found

Getting language server Python executable. Waiting for RobotFramework (python) Language Server to finish activating... Starting RobotFramework Language Server with args:…
SAK
  • 49
  • 1
  • 2
  • 6
0
votes
1 answer

Robocode BasicBot Going To The Middle Of The Map... Not

This is one of the classic Robocode practice questions: Going to the middle of the map. I didn't want to move twice (once for x-axis and once for y-axis), but instead get the bearing towards the middle and move in a single motion after setting my…
Cyrendex
  • 51
  • 8