Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix validation to handle double respawn edge case #5

Closed
wants to merge 1 commit into from
Closed

Fix validation to handle double respawn edge case #5

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented May 2, 2014

The harness incorrectly validates the situtation where both bots are on the respawn point.
(This situation can happen when the bots respawn on consecutive turns.)

This is what it can look like from a bot's prespective.

Input                Output
###################  ###################
#........#........#  #........#........#
#*##.###.#.###.##*#  #*##.###.#.###.##*#
#.##.###.#.###.##.#  #.##.###.#.###.##.#
#.................#  #.................#
#.##.#.#####.#.##.#  #.##.#.#####.#.##.#
#....#...#...#....#  #....#...#...#....#
####.###.#.###.####  ####.###.#.###.####
####.#.......#.####  ####.#.......#.####
####.#.## ##.#.####  ####.#.## ##.#.####
    ...# B #...          ...# B #...    
####.#.## ##.#.####  ####.#.##A##.#.####
####.#.......#.####  ####.#.......#.####
####.#.#####.#.####  ####.#.#####.#.####
#........#........#  #........#........#
#.##.###.#.###.##.#  #.##.###.#.###.##.#
#*.#...........#.*#  #*.#...........#.*#
##.#.#.#####.#.#.##  ##.#.#.#####.#.#.##
#....#...#...#....#  #....#...#...#....#
#.######.#.######.#  #.######.#.######.#
#.................#  #.................#
###################  ###################

Currenlty the harness regards the only two valid moves as invalid.
This pull request fixes that.

@EntelectChallenge
Copy link
Owner

If you mean two moves for "A", this is incorrect. "A" will have only one move in the second maze (that is moving down). "A" is still in the re-spawn zone so it cannot move up. Please let me know if I'm misinterpreting.

@ghost
Copy link
Author

ghost commented May 14, 2014

When both bots are on the respawn point, moving up or down into the empty squares treated as invalid.

The maze on the left is the input that the bot is sent.
The one on the right is the output that my bot returns which the harness incorrect regards as invalid.

@pcfour
Copy link

pcfour commented May 28, 2014

Hey guys, I'm also having trouble with this bug, especially when playing my bot against itself. Will this change make it into the final version?

@EntelectChallenge
Copy link
Owner

Hi, I have looked at it again, it seems that you're under the impression that it is the responsibility of the bot to regenerate B if it doesn't exist? The test harness will handle this if you move from the centre and leave the centre blank.

@EntelectChallenge
Copy link
Owner

Hi, I've confirmed that this is working as expected. You will not need to generate the opponent bot. You simply move "A" up or down, and the test harness will generate the opponent bot in the next turn. Please let me know if you come right so that I can close this issue.

@ghost
Copy link
Author

ghost commented Jun 4, 2014

It doesn't work.
Here is an test bot - https://github.com/hwiechers/2014-Entelect-HarnessTester.
Run it against itself from the same dir.
Delete the ply.txt file between runs.

Validation fails on the 5th move i.e.

###################
#........#........#
#*##.###.#.###.##*#
#.##.###.#.###.##.#
#.................#
#.##.#.#####.#.##.#
#....#...#...#....#
####.###.#.###.####
####.#.......#.####
####.#.## ##.#.####
     ..#   #..     
####.#.##A##.#.####
####.#.......#.####
####.#.#####.#.####
#........#........#
#.##.###.#.###.##.#
#*.#...........#.*#
##.#.#.#####.#.#.##
#....#...#...#....#
#.######.#.######.#
#.................#
###################

The input that the bot gets from the harness on that turn is

###################
#........#........#
#*##.###.#.###.##*#
#.##.###.#.###.##.#
#.................#
#.##.#.#####.#.##.#
#....#...#...#....#
####.###.#.###.####
####.#.......#.####
####.#.## ##.#.####
     ..# B #..     
####.#.## ##.#.####
####.#.......#.####
####.#.#####.#.####
#........#........#
#.##.###.#.###.##.#
#*.#...........#.*#
##.#.#.#####.#.#.##
#....#...#...#....#
#.######.#.######.#
#.................#
###################

and not

###################
#........#........#
#*##.###.#.###.##*#
#.##.###.#.###.##.#
#.................#
#.##.#.#####.#.##.#
#....#...#...#....#
####.###.#.###.####
####.#.......#.####
####.#.## ##.#.####
     ..# A #..     
####.#.## ##.#.####
####.#.......#.####
####.#.#####.#.####
#........#........#
#.##.###.#.###.##.#
#*.#...........#.*#
##.#.#.#####.#.#.##
#....#...#...#....#
#.######.#.######.#
#.................#
###################

@ghost
Copy link
Author

ghost commented Jun 13, 2014

I'm rage quitting the challenge this year so this isn't an issue for me anymore.

@ghost ghost closed this Jun 13, 2014
@pcfour
Copy link

pcfour commented Jun 13, 2014

No you can't quit! Eish, is still a problem. Sad to see you go dude.

Entellect, please don't ignore this log, it will still result in a valid move being declared invalid.

@EntelectChallenge
Copy link
Owner

This issue has been resolved.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants