last day (20 days later) » 

3:41 PM
Question about the " the team with the most lives left wins. If all this is equal, it's a draw." - how many lives do you start with? if you die, do you somehow respawn?
 
3:53 PM
Oh, that shouldn't ahve made it into the final version, thanks for pointing it out.
have*
@user2813274 being hit by a bullet kills you, no lives.
thanks again for pointing that out
 
Another question, is a "step" in the game look, move, shoot, or do you look, move, look, shoot?
And do both planes need to decide their movement at the same time, or does one plane move/shoot and then the next plane?
 
4:16 PM
look, move, look shoot
and it's at the same time
it's look, move, look, (check for collisions), shoot, (check if anyone got hit)
 
 
2 hours later…
6:01 PM
suppose a plane is going horizontally east, and wanted to change directions to NED, would it be allowed to, or is that a violation of the 45º rule?
 
NED would be allowed
If you're going N you can go in any direction That contains the letter N
Same for other 'main directions'
 
6:29 PM
So you can rotate 45º on the NESW plane, and then another 45º on the EWUD plane, for a total of 55º?
Also it seems like I can run the following code which I probably shouldn't be able to: super.enemyPlanes[0].setCoolDown(99);
 
Hmm, I guess the 45° rule doesn't quite work out, I'll have to think about rewording that.
You're allowed to do that
those instances of planes are just for your information
 
ah, good to know
 
the controller keeps his own copies
 
6:47 PM
hey, a custom chat room!
just got the controller working locally
I think this contest, more than most, would benefit from more helper functions
specifically, I want to write a function that tells a plane when it's committing to hitting a wall.
or, conversely, eliminates wall-commitment moves from the possible move list
 
@Sparr I think you only need to check 2 moves in advance, here is my code for it: // remove positions with no future from flight plan

potentialDirections.removeIf(new Predicate<Direction>()
{
@Override
public boolean test(Direction test)
{
boolean hasFuture = false;
for (Direction compare : p.getPossibleDirections())
{
Plane future = new Plane(arenaSize, 0, compare, p.getPosition().add(compare.getAsPoint3D()));
for (Direction d : future.getPossibleDirections())
{
if (future.getPosition().add(d.getAsPoint3D()).isInArena(arenaSize))
 
if you're touching the north wall, any N* move hits the wall. If you're one unit off the north wall, then any N* move with a N facing direction commits you to hitting the wall one turn later.
 
yes, which is why you need to check 2 moves in advanced
but I haven't been able to wrap my head around flying into a corner yet
 
you seem to be ignoring facing direction
also corners :)
 
not sure if you need more than 2 moves in advance for that
 
7:00 PM
re facing direction, the game lets you fly one direction but face a differet (off by one) direction
 
well I am checking only the valid moves and only after the supposed move, so I assume the current direction becomes that of a valid move
 
err, sorry
potentialDirections contains what?
 
it's a list of p.getPossibleDirections() that I trim the "bad" moves from
 
ok, thought so
 
such as the ones that crash into a wall
 
7:02 PM
so, here's the problem
your first for loop goes through all the directions your plane might move this turn, right?
 
yes
 
and the future plane is instanciated, both moved in that direction AND facing that direction
 
then I remove all the ones that crash into a wall in 1 move
and then I remove all the ones that crash into a wall in 2 moves
 
that's not a requirement. your plane can move in a new direction without changing its heading. you need to consider 'lane change' moves there too
 
oh, it can?
how does that work?
 
7:04 PM
public boolean changeDirection;
you set or don't set that in your MOve
 
I was actually going to ask about that.. I didn't quite understand the point of it
 
if you don't changeDirection, then your plane moves in a new direction, but doesn't turn
so, let's say you're flying north
you can keep flying north and keep facing north
or you can fly northeast and keep facing north
or you can fly northeast and be facing northeast
so, you have... Plane future = new Plane(arenaSize, 0, compare, p.getPosition().add(compare.getAsPoint3D()));
 
well... I see the problem now
 
you need to re-run the loop after that with... Plane alternatefuture = new Plane(arenaSize, 0, currentdirection, p.getPosition().add(compare.getAsPoint3D()));
 
but my code never causes my plane to fly in a direction that it isn't facing
 
7:07 PM
also, yes, corners are weird :p
I think you need to check three moves out for corners
maybe even four
if you're at 0,0,0 then flying N or W or D will crash
 
My plan was to add the cubes closes to the corners to my "danger zone"
 
oh, well, that works too :)
but you're overly limiting your options
 
that way I fly in a "rounded" box
well.. if I do get into a corner, my plane crashes anyways, since you can't escape it
so I might as well avoid them
aside from the start, how would you ever reach 0,0,0 and not die the next turn?
 
you wouldn't
but 1,1,1 is trickier
 
gah I need some like cubes or something to visualize this...
 
7:11 PM
first, solve it for a 2d map
 
2-d map you can safely fly through 1,1
you can even go from 0,1 to 1,0
 
in any direction but one
if you enter 1,1 from 2,2 then you're dead
 
but that doesn't make the corner special
you can enter 1,5 from 2,5 and be left with no options
 
??
if you fly from 2,5 to 1,5 then you can turn 45 degrees to 0,4, then 45 more to 0,3
and safely escape
however, if you fly from 2,2 to 1,1 then you're screwed
 
darn, your right
I think I will just go for running this and logging my "crash plan" coordinates.. this is complicated to think about
 
7:15 PM
now, I don't THINK that gets more complex in 3d
oh, hmm
maybe it does
 
I don't think it does either, with the asterisk that you can change your angle in two planes at once
 
so, if any two coordinates are 2, then flying into any position with two 1 coordinates is death, in the 2d sense
however, if you fly from 3,3,3 to 2,2,2 then your next move must be a two-one-coordinate position
so, my question is whether 3,3,3 to 2,2,2 is a death move
all three possible two-axis diversions are functionally equivalent, so considering just one...
3,3,3 to 2,2,2 is a north/west/down move. if you turn to just down then you end up at 2,2,1 where you can turn to east/down for 2,3,0 and then just east for 2,4,0
so, 3,3,3 to 2,2,2 is escapable
however, not ALL paths after 3,3,3 to 2,2,2 with two future moves have a third future move
right?
if you're at 2,2,2 moving NWD then your algorithm will say that NWD is a valid move, because 1,1,1 and 0,0,0 can be reached from there
but that's suicide
also, that's a LOT of computation
just having a lookup table of suicide moves would save a lot of cpu time on the judge
 
but I am planning to add 1,1,1 as a place to avoid in the 2-step look-ahead
 
ahh
 
and I think most people would do that as well
 
7:29 PM
except 1,1,1 is a legit place to be, if you're flying perpendicular to the corner
 
that is true..
 
from 1,1,2 to 1,1,1 to 1,2,1
err, almost that
 
right.. now I need to see how to test this
 
another approach:
if you're facing in an axial direction, you must make at least two moves from now in that direction (possibly combined with other directions)
if you're facing in a 2d diagonal direction, you must make at least three moves from now in one of the two relevant directions
err
off by one
3d diagonal gives you three exits, each requiring two moves in a relevant direction
so, if I'm going NWD and I'm within two units of all three N W D walls, I'm screwed. that's the corner danger zone
 
7:46 PM
So really you need a position and a direction, and from that you can decide if you are safe or not
 
hmm
not quite, there's still the lane change consideration
given my position and direction, I need to consider all of the spaces I could move to AND the two directions I might be facing when I get there
a turn might be safe while a lane change is not
a lane change might be safe while a turn is not
I'm going to call those turn and drift, which is Car Wars terminology
 
8:02 PM
@user2813274 in your code, test is never used within your predicate test...
 
 
 
1 hour later…
10:05 PM
I have to go to bed now, I'll go through this conversation tomorrow and help out where I can.
Thanks for your interest guys
 
public Move[] act() {
    Move[] moves = new Move[2];
    System.err.println(moves[0].getAsString());
I'm driving myself crazy over why that moves[0] results in a NullPointerException
 
10:36 PM
@Sparr because there's nothing in that array yet
It gets initialized as an array with two times null
 
doh
yeah, found that. new to Java, used to Python lately
I think my planes are avoiding walls now :)
more precisely and with more variety of maneuvers than starfox, which was my inspiration here
 
I look forward to running it.
 
heh, it's still dumb, just fires at random
need to make it at least as smart as starfox for targeting
sent you a one line pull request for the controller
 
This challenge seems cool, but I barely know anything about Java!
 
Maybe Rainbolt will write a wrapper when he gets back
I'm new to github, where do I see this pull request?
 
10:44 PM
@PhiNotPi my java is horrible, but it's manageable with a lot of google :)
I think my certain death code is some runtime complexity levels faster than starfox's :)
 
Done.
 
11:39 PM
haha
when my plane fights itself, the match lasts one round
four shots, four kills
 
reckless planes you have ^^
where can I upload huge text files?
close to 3 MB
 
github gist?
 
cool
Gist doesn't enjoy having 3 MB of text pasted to it :s
 
right now my plane vs moveandshootplane is about 30% win 60% loss 10% draw
gist has an "add file" button
 
How do you lose?
 
11:45 PM
looking into that
ha
mid-air collisions between my own planes
I guess I should prevent that
 
always a bummer when that happens
 
lol
56% win, 3% loss, 31% draw when I eliminate collisions :)
 
That's an excelent result
You're doing significantly better than a plane that just doesn't fly into walls
How do you do against Whirligig?
 
let me check
my losses are from flying into walls :|
so something is wrong with my safe move check
gonna run whirligig now
 
Hmm, some checks not running perfectly I suppose
Still, 3% is okay
 
11:55 PM
LeadYourTargetPlane1: 4 points.
MoveAndShootPlane1: 0 points.
Whirligig: 2 points.
 
Nice
 
83:1 against whirligig
 
Want to submit?
You can always improve later
 
not quite yet
want to track down that wall bug
 
Understandable
Did you see what's happening with Starfox?
 
11:56 PM
i saw your comment
moving into the line of fire?
 
He constantly gets shot
I think he mixed up safe and risky zones somewhere
It's quite fun though
 
A mid-air collision!!!
A mid-air collision!!!LeadYourTargetPlane1's first plane: dead

LeadYourTargetPlane1's second plane: dead

MoveAndShootPlane1's first plane: dead

MoveAndShootPlane1's second plane: dead
wow :)
 
Everyone crashed into everyone?
 
two two-plane collisions
 
sweet
"Let's call it a draw"
Oh man, I soo hope someone manages to represent these fights in 3D
 
11:59 PM
:)
whirligig's single win was shooting my planes
 

  last day (20 days later) »