Skip to content

How can we make WotA faster? #147

Description

@PascalCremer

I've just done a quick game between pwahs03 and clonewarriors and it gets quite slow once around 1000 ants are on the map. Profiling showed:

In Call Tree:

  • knapp 90% in GameWorld.tick()
  • 30% in SpacePartitioning.antObjectsInsideCircle
  • 22% in SpacePartitioning.antMessagesInsideCircle
  • rest in pwahs AI and other methods

Sorted by selftime per method:

  • 26% in Parameters.shortestVectorOnTorusTo
  • 14% in SpacePartitioning.TsInsideCircle
  • 10% in Vector.subtract
  • 10% in pwahs03.HillAI.contained (checks if given Snapshot is contained in a given list)
  • 8% in shortestDifferenceOnTorus (which does not more than:
    return shortestVectorOnTorusTo(Vector.subtract(p1,p2));)
  • 8% in Parameters.distance(Vector, Vector)
  • 4% in Vector.add

which already gives 80% of the runtime.

Any ideas, comments?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions