Coder Social home page Coder Social logo

2015-spaceinvaders-testharness's People

Contributors

amanica avatar bhaeussermann avatar deanwookey avatar entelectchallenge avatar frmokoena avatar jansendup avatar jlaihong avatar leppie avatar mattpwest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

2015-spaceinvaders-testharness's Issues

Process must exit before requested information can be determined.

Hi,

The forum seems a bit buggy so I'm logging this here. The harness crashes when my bot either takes to long or prints too much, I can't say which, but I'm pretty sure it bombs before the 3 seconds are over. Surely a stupid bot shouldn't crash the harness anyway...thanks for the help

Something went wrong...
Process must exit before requested information can be determined.
at System.Diagnostics.Process.EnsureState(State state)
at System.Diagnostics.Process.get_ExitCode()
at ChallengeHarness.Runners.BotRunner.StartProcess(Process p) in c:\Dev\100K\2015-Sp
aceInvaders-TestHarness\ChallengeHarness\Runners\BotRunner.cs:line 208
at ChallengeHarness.Runners.BotRunner.GetMove(MatchRender rendered) in c:\Dev\100K\2
015-SpaceInvaders-TestHarness\ChallengeHarness\Runners\BotRunner.cs:line 81
at ChallengeHarness.Runners.MatchRunner.GetMove(BotRunner player, MatchRender render
ed) in c:\Dev\100K\2015-SpaceInvaders-TestHarness\ChallengeHarness\Runners\MatchRunner.
cs:line 67
at ChallengeHarness.Runners.MatchRunner.Run() in c:\Dev\100K\2015-SpaceInvaders-Test
Harness\ChallengeHarness\Runners\MatchRunner.cs:line 54
at SpaceInvadersDuel.Program.Main(String[] args) in c:\Dev\100K\2015-SpaceInvaders-T
estHarness\SpaceInvadersDuel\Program.cs:line 44

New SetErrorMode in 1.0.4 breaks in linux

Hi

The 1.0.3 harness works perfectly in linux. Since the 1.0.4 version it breaks:

Something went wrong...
SetErrorMode
  at (wrapper managed-to-native) ChallengeHarness.Runners.ChangeErrorMode:SetErrorMode (int)
  at ChallengeHarness.Runners.ChangeErrorMode..ctor (ErrorModes mode) [0x00000] in <filename unknown>:0 
  at ChallengeHarness.Runners.BotRunner.StartProcess (System.Diagnostics.Process p) [0x00000] in <filename unknown>:0 
  at ChallengeHarness.Runners.BotRunner.GetMove (ChallengeHarnessInterfaces.MatchRender rendered) [0x00000] in <filename unknown>:0 
  at ChallengeHarness.Runners.MatchRunner.GetMove (ChallengeHarness.Runners.BotRunner player, ChallengeHarnessInterfaces.MatchRender rendered) [0x00000] in <filename unknown>:0 
  at ChallengeHarness.Runners.MatchRunner.Run () [0x00000] in <filename unknown>:0 
  at SpaceInvadersDuel.Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

This is probably due to kernel32.dll import added in this commit: 4040177.

Any command line to build project?

I'm not familiar with c# and saw the readme said we need to install software just to build it? Is there not just a cmd we can run to build it?

Console Replay

Please add a console option like --replays to specify the replay output folder?

Number of lives is inconsistent between building and dying

Reported on behalf of MajorPAIN from the challenge forums.

I have noticed that you are able to build 3 buildings, and then when your ship dies you lose.
You also lose when you build 2 buildings and your ship dies.
And then you also lose when your ship dies 3 times.
Should you be able to build 3 buildings? Seems like the limit should be 2.

Crash when spawning ship and no orders are given

Hi Matt, just a heads up not sure if anyone else has spotted it yet but the harness is still crashing when trying to respawn the ship. Looks like it is caused by the bot terminating within the 3 second timeout and not deciding on a move to make. I’ve come up with a solution to always do ShipCommand.Nothing is nothing was decided, not getting any weird unexpected crashes anymore.

On behalf of Indigodev who reported it on this forum thread.

Bullet moving through destroyed wall

I'm getting this exception with the harness:

Exception of type 'SpaceInvaders.Exceptions.MoveNotOnMapException' was thrown.
   at SpaceInvaders.Core.Map.CheckBounds(Int32 x, Int32 y) in c:\Dev\100K\2015-
SpaceInvaders-TestHarness\SpaceInvaders\Core\Map.cs:line 234
   at SpaceInvaders.Core.Map.TraverseMap(MapAction action, Entity entity, Int32
 targetX, Int32 targetY) in c:\Dev\100K\2015-SpaceInvaders-TestHarness\SpaceInv
aders\Core\Map.cs:line 202
   at SpaceInvaders.Core.Map.MoveEntity(Entity entity, Int32 x, Int32 y) in c:\
Dev\100K\2015-SpaceInvaders-TestHarness\SpaceInvaders\Core\Map.cs:line 191
   at SpaceInvaders.Entities.Bullet.Update() in c:\Dev\100K\2015-SpaceInvaders-
TestHarness\SpaceInvaders\Entities\Bullet.cs:line 49
   at SpaceInvaders.Core.UpdateManager.UpdateEntityGroup(EntityType type) in c:
\Dev\100K\2015-SpaceInvaders-TestHarness\SpaceInvaders\Core\UpdateManager.cs:li
ne 74
   at SpaceInvaders.Core.UpdateManager.Update() in c:\Dev\100K\2015-SpaceInvade
rs-TestHarness\SpaceInvaders\Core\UpdateManager.cs:line 42
   at SpaceInvaders.Core.Map.UpdateEntities() in c:\Dev\100K\2015-SpaceInvaders
-TestHarness\SpaceInvaders\Core\Map.cs:line 146
   at SpaceInvaders.Core.Match.Update() in c:\Dev\100K\2015-SpaceInvaders-TestH
arness\SpaceInvaders\Core\Match.cs:line 101
   at ChallengeHarness.Runners.MatchRunner.Run() in c:\Dev\100K\2015-SpaceInvad
ers-TestHarness\ChallengeHarness\Runners\MatchRunner.cs:line 78
   at SpaceInvadersDuel.Program.Main(String[] args) in c:\Dev\100K\2015-SpaceIn
vaders-TestHarness\SpaceInvadersDuel\Program.cs:line 47

Looking at the bullet in the top left corner it seems that the bullet is moving through the wall position and out of bounds.

# #################
#|                #
#   VVV           #
#    i        -   #
#                 #
#            x  x #
#                 #
#   x     x  x  x #
#                 #
#   x  x  x  x  x #
#                 #
#   x  x  x  x  x #
#                 #
#                 #
# x  x  x  x      #
#                 #
# x  x  x  x  x   #
#    !            #
#       x  x  x   #
#                 #
#      !   x  x   #
#                 #
#     AAA         #
#                 #
###################

Regards,
Leonard

MissileController is lost on Player.CopyAndFlip

Seems to be missing.

The following fixes it:

if (player.MissileController != null)
{
  copy.MissileController = MissileController.CopyAndFlip(player.MissileController, flipper, flippedEntities);
}

Let me know if you want a PR.

Console Crashes

Console crashes when using --scolling from java

Something went wrong...
The handle is invalid.

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
at System.Console.get_WindowHeight()
at ChallengeHarness.Runners.MatchRunner.IsConsoleTooSmallForNormalLogging(Int32 mapHeight) in c:\2015-SpaceInvaders-TestHarness-master\ChallengeHarness\Runners\MatchRunner.cs:line 117
at ChallengeHarness.Runners.MatchRunner.SetupLogging(Boolean consoleLoggingDisabled, Boolean consoleLoggingMustScroll) in c:\2015-SpaceInvaders-TestHarness-master\ChallengeHarness\Runners\MatchRunner.cs:line 51
at ChallengeHarness.Runners.MatchRunner..ctor(IMatch match, String playerOneFolder, String playerTwoFolder, IRenderer renderer, Boolean consoleLoggingDisabled, Boolean consoleLoggingMustScroll) in c:\2015-SpaceInvaders-TestHarness-master\ChallengeHarness\Runners\MatchRunner.cs:line 37
at SpaceInvadersDuel.Program.Main(String[] args) in c:\2015-SpaceInvaders-TestHarness-master\SpaceInvadersDuel\Program.cs:line 38

Crash if the terminal is too small

Crash on Linux if the terminal is too small (manually increasing the size before running fixes it):
...
Something went wrong...
Value must be positive and below the buffer height.
Parameter name: top
at System.TermInfoDriver.SetCursorPosition (Int32 left, Int32 top) [0x00000] in :0
at System.ConsoleDriver.SetCursorPosition (Int32 left, Int32 top) [0x00000] in :0
at System.Console.SetCursorPosition (Int32 left, Int32 top) [0x00000] in :0
at ChallengeHarness.Loggers.ConsoleLogger.WriteToConsoleAndDebug (Int32 x, Int32 y, System.String message) [0x00000] in :0
at ChallengeHarness.Loggers.ConsoleLogger.Log (ChallengeHarnessInterfaces.MatchRender rendered) [0x00000] in :0
at ChallengeHarness.Runners.MatchRunner.LogAll (ChallengeHarnessInterfaces.MatchRender renderP1) [0x00000] in :0
at ChallengeHarness.Runners.MatchRunner.Run () [0x00000] in :0
at SpaceInvadersDuel.Program.Main (System.String[] args) [0x00000] in :0

Build version cannot call bot players

I'm using the build version 1.0.0: SpaceInvadersDuel.exe. From what I understand it should run run.bat %1 in the player1 and player2 folders. I have my plain set up in player 1 folder, which does not work and the initial default player2 given in the build. The default player2 output is also the error:

/c: /c: is a directory
[GAME]  Bot Player 2 finished in 34 ms.
[GAME]  Process exited with non-zero code 126 from player Player 2.
[GAME]  No output file from player Player 2

I have installed the .net framework. What am I doing wrong here?

Test Harness Fails

So when the test harness is running a match, and either one of the bots encounters an issue, Windows will display a popup dialog telling you that and issue was encountered with the process and if you want windows to diagnose the problem. It hangs on this until someone goes and closes those dialogs and only then will the match end.

Please rectify with global catch all and output to the console/files?

Off-by-one in Alien collisions

To reproduce: Create Bot X which issues 5 Nothing commands, followed by a Shoot command. Create Bot Y which issues 6 Nothing commands, followed by a Shoot command.

Expected: Bot X's shot should hit an Alien. Bot Y's shot should narrowly miss the same Alien.

Actual: Both Bot X and Bot Y's shots will hit the Alien.

TestHarness crashes

Hi

if I run the TestHarness with two simple bots it runs between 30 and 115 rounds before crashing. The Replay looks fine up to the point of the crash. It looks as if it is affected by the choice of moves. There cannot be a timing issue since the whole run is only a few seconds long.

"The handle is invalid" error when called from external app

This SO link seems to hit the nail on the head.

Basically when calling the test harness from external application (yes...I am...doing...things...to it), that error occurs (stack trace follows below). I suspect the solution is as simple as wrapping the console cursor manipulation calls in try-catch blocks.

Something went wrong...
The handle is invalid.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.Console.GetBufferInfo(Boolean throwOnNoConsole, Boolean& succeeded)
    at System.Console.Clear()
    at ChallengeHarness.Loggers.ConsoleLogger..ctor() in c:\Dev\100K\2015-SpaceInvaders-TestHarness\ChallengeHarness\Loggers\ConsoleLogger.cs:line 13
    at ChallengeHarness.Runners.MatchRunner..ctor(IMatch match, String playerOneFolder, String playerTwoFolder, IRenderer renderer) in c:\Dev\100K\2015-SpaceInvaders-TestHarness\ChallengeHarness\Runners\MatchRunner.cs:line 21
    at SpaceInvadersDuel.Program.Main(String[] args) in c:\Dev\100K\2015-SpaceInvaders-TestHarness\SpaceInvadersDuel\Program.cs:line 38

Player 2 ship missing LastCommand after flip

The copy constructor for Ships does not copy LastCommand.

Repro steps:
– Create a SpaceInvaders.Entities.Ship with LastCommand != ShipCommand.Nothing
– Pass the Ship to the copy constructor
– Note1: clone.LastCommand != ship.LastCommand
– Note2: clone.LastCommand == ShipCommand.Nothing

Player.Ship is not set if you are player 2

Logged on behalf of GroenBoer from the Challenge forums:

I have played around with the test harness and demo bot. Everything from the initial setup works fine up until I customize the code a bit and load it in as Player 2 in the test harness (the precompiled version). In this case the Player 2 instance never seems to populate the Ships property for either.
Both of these lines of code return null when in execute it as player two
currentMatch.Players[0].Ship
currentMatch.Players[1].Ship

Is anyone else having the same problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.