Giter Site home page Giter Site logo

spacesettlers's People

Contributors

amymcgovern avatar cameron-bost avatar duncanwalter avatar jherrin1 avatar kteavery avatar maryhahnert avatar matthewcmatt avatar noahzemlin avatar saiprakashdavuluri avatar ssshan96 avatar tysonharris avatar wrmf avatar zackaryhoyt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

spacesettlers's Issues

base damage

Ensure base damage isn't being double counted.

Add Toroidal Wrap Around for LineGraphics

Current implementation does not wrap line graphics around the edges of the canvas.

Implement toroidal wraparound using the existing methods used by, for instance, ShipGraphics.
Do not implement the wraparound within the LineGraphics class.

Null Pointer in Passive Heuristic

Null Pointer in Passive Heuristic

Bug Description

Null pointer error in the passive heuristic asteroid collector's getMovementEnd().

System Information

  • Processor: 4x Intel(R) Core(TM) i5-4200U CPU @ 1.60GHz
  • Memory: 8074MB
  • Operating System: Ubuntu 16.04.3 LTS

Notes

I was unable to reproduce this on my Windows machine. I have not tried on an Ubuntu 16.04 virtual box. Regardless the code at the error line should check prior to removing null from a list.

Reproduction

From a fresh clone of spacesettlers:

In config/heuristicCoop/SpaceSettlersConfig.xml:

  • Remove all team configs except for
<HighLevelTeamConfig>
	<teamName>HeuristicMinerTeam</teamName>
	<!-- Pick the one you intend to play against (self versus other) -->
	<configFile>passive-heuristic-clientinit.xml</configFile>
</HighLevelTeamConfig>
  • Remove all bases except for:
<BaseConfig>
	<teamName>HeuristicMinerTeam</teamName>
</BaseConfig>
  • Run ant spacesettlers-coop
  • (Optional) - Increase max speed to increase the likelihood of the bug occurring.

Stack Trace

logan@logan-Inspiron-5437:~/Documents/School/Senior/Spring 2019/AI/spacesettlers$ ant spacesettlers-coop
Buildfile: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/build.xml

init:
    [mkdir] Created dir: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/build
    [mkdir] Created dir: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/dist
    [mkdir] Created dir: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/docs/api

compile-all:
    [javac] /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/build.xml:48: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 95 source files to /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/build
    [javac] Note: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/src/spacesettlers/ladder/Ladder.java uses unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.

jar-spacesettlers:
    [unzip] Expanding: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/lib/JSAP-2.1.jar into /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/build
    [unzip] Expanding: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/lib/kxml2-2-1.3.0.jar into /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/build
    [unzip] Expanding: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/lib/xstream-1.4.2.jar into /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/build
      [jar] Building jar: /home/logan/Documents/School/Senior/Spring 2019/AI/spacesettlers/dist/spacesettlers.jar

spacesettlers-coop:
     [java] Initial location not provided for team HeuristicMinerTeam...generating: UL (x,y) = 680, 222 LR (x,y) = 1080, 950
     [java] Starting ship for team HeuristicMinerTeam in location (952.8285073310178 , 276.37044188808017, 0.0) velocity: 0.0 0.0, 0.0
     [java] spacesettlers.simulator.SpaceSettlersSimulator@1a3869f4
     [java] transform is AffineTransform[[0.60146252285192, 0.0, 0.0], [0.0, 0.60146252285192, 0.0]]
     [java] On time step 0
     [java] Team: Pacifist Heuristic Asteroid Collector scored 0.0
     [java] java.util.concurrent.ExecutionException: java.lang.NullPointerException
     [java]     at java.util.concurrent.FutureTask.report(FutureTask.java:122)
     [java]     at java.util.concurrent.FutureTask.get(FutureTask.java:206)
     [java]     at spacesettlers.clients.Team.getTeamMovementEnd(Team.java:479)
     [java]     at spacesettlers.simulator.SpaceSettlersSimulator.advanceTime(SpaceSettlersSimulator.java:698)
     [java]     at spacesettlers.simulator.SpaceSettlersSimulator.run(SpaceSettlersSimulator.java:1064)
     [java]     at spacesettlers.simulator.RunSimulator.main(RunSimulator.java:107)
     [java] Caused by: java.lang.NullPointerException
     [java]     at spacesettlers.clients.PacifistHeuristicAsteroidCollectorTeamClient.getMovementEnd(PacifistHeuristicAsteroidCollectorTeamClient.java:233)
     [java]     at spacesettlers.clients.Team$2.call(Team.java:471)
     [java]     at spacesettlers.clients.Team$2.call(Team.java:469)
     [java]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
     [java]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
     [java]     at java.lang.Thread.run(Thread.java:748)

With the error repeating for the remainder of the game.

multi-thread ladder

Make the ladder multi-threaded so that it can handle the larger class size

re-check java threading timers

See if java thread timers work correctly for infinite looping agents now that we are requiring java 1.8 (they never worked right for 1.6 )

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.