Code Wars 2014 Windwardopolis 2 – FAQ

New questions are added at the top.

  • Q: I am drawing cards and they do not show as OkToPlay immediately.
  • A: The cards are updated after the draw on the next power-up message. This will not occur until someone plays a power-up. During that delay, the cards are playable, but that will not be updated on the client side immediately. Cards are OkToPlay immediately upon drawing at the start of the game. After the start, you draw, visit a company (bus) or store (coffee) stop, and they are then marked OkTOPlay.
  • Q: Some of the power-ups say they will last for 30 seconds. How long is this in ticks? Is this 30 seconds at the default ticks/second in the server?
  • A: It’s 30 seconds at 96 ticks/second. So for faster speeds, it will be over sooner.
  • Q: How do the ALL_OTHER_CARS_QUARTER_SPEED and MULT_DELIVERY_QUARTER_SPEED interact? If one is active and the other is used, how long are we moving at 1/4 speed for?
  • A: They’re independent. So you’re at ¼ speed while MULT_DELIVERY_QUARTER_SPEED is in play, but the count down of the 30 seconds is occurring during that time.
  • Q: Can I use outside reference sources?
  • A: Yes. You can use anything you find on the net, in your textbooks, etc. However, you may NOT ask questions of anyone anywhere except from other students in the competition (including competing teams). So you can search and read on StackOverflow, but no posting questions there.
  • Q: My client A.I. cannot connect to the proctor’s game server.
  • A: Turn off the firewall on both systems.
  • Q: I read Python 2.7 in places and Python 3 in other places. Which is it?
  • A: Python 2.7.
  • Q: I am getting a log4j message: “WARN No appenders could be found for logger” and/or “WARN Please initialize the log4j system properly”.
  • A:Please read this StackOverflow article.
  • Q: Can we Modify the code in the API package in the client code? For example add a comparator in the Passenger Class
  • A: Yes, you are free to do any modifications in the client code.
  • Q: Do I need to run the server using Visual Studio?
  • A: No. You have that as an option if you want to see what the server is doing. But you can also run the server directly by executing the file windwardopolis.exe that is in the root of the server zip file.
  • Q: I directed my limo to pick up a Larry Page. Larry was at the bus stop my limo stopped at. But Larry was not picked up.
  • A: One of two thing occurred. The first is you already transported Larry once and therefore you may not transport him again. The second is the passenger you were carrying would not exit the limo because one of their enemies was at the bus stop.
  • Q: My limo went through the Apple bus stop and Shirley Clawson exited my limo. But Apple was not her requested destination – why did she exit?
  • A: When your car stops at a bus stop the passenger you are carrying will always exit, unless one of their enemies are there.
  • Q: How many map units does the limo take up? Is it 3 (1 for front bumper, 1 for center, 1 for back bumper)? I ask this because it seems that the front bumper of the car must enter the intersection for the yellow/red light cases, but the Limo class itself only give the position in map units of the center of the vehicle.
  • A: This gets into the map units (as opposed to the tile units which is what your client is working with). The limo moves the central point of the car but checks entering a tile and keeping a safe distance based on the front bumper which is 7 (see Limo.cs) map units ahead of the central point. The limo takes up 23/4 map units when straight and a bit more when turning. A tile is 24×24 map units. A limo can be in 1 or 2 tiles, but is never in 3.
  • Q: What information do we have available on the other players passed into the GameStatus method? Specifically are the player.getLimo.getPath, Player.getPickup, and player.getLimo.getPassenger of other players available to our AI?
  • A: You know the location of the other limos and if they have a passenger. But their pickup and path will be empty – you don’t know those.
  • Q: What does it mean when the documentation says: Same issue for a change requiring a right/left turn in a tile when the car has already entered the tile. It has to continue out of that tile and then U-turn, and then right/left turn. If you provide a new path where the turn will occur after the map tile the car is presently in, then it will happen on that first tile (unless it is a curve).
  • A: First off the documentation is wrong when it says no u-turns in curves – it will do a u-turn in a curve. Second, a car actually moves in map units. A tile is 24×24 map units. The server determines what direction a car moves through a tile when the front bumper enters the tile. At that point, it must continue through that tile until it reaches the start of the next tile. It is only when it goes from tile to tile that any change in the path will be handled.
  • Q: Does every passenger have the same number of enemies?
  • A: Nope, it’s a random total each game and randomly assigned. The total is between the passenger points and passenger points + 3.