Interface SwarmIntelligence


public interface SwarmIntelligence
Swarm intelligence algorithm for collective problem solving.

SwarmIntelligence defines how individual agents combine their partial solutions into a collective solution.

Algorithms

  • Ant Colony Optimization (ACO) - Pheromone-guided path finding
  • Particle Swarm Optimization (PSO) - Velocity-based exploration
  • Bee Algorithm - Scout and recruit pattern
  • Consensus - Iterative averaging
See Also:
  • Method Details

    • initialize

      void initialize(String problem, List<com.tnsai.agents.Agent> agents, SwarmEnvironment environment)
      Initializes the algorithm for a new problem.
      Parameters:
      problem - problem description
      agents - participating agents
      environment - shared environment
    • iterate

      boolean iterate(List<com.tnsai.agents.Agent> agents, SwarmEnvironment environment)
      Executes one iteration of the algorithm.
      Parameters:
      agents - participating agents
      environment - shared environment
      Returns:
      true if should continue, false if converged
    • getBestSolution

      String getBestSolution()
      Gets the current best solution.
      Returns:
      best solution found so far
    • getSolutionQuality

      double getSolutionQuality()
      Gets the current solution quality.
      Returns:
      quality score (higher is better)
    • getParameters

      Map<String,Object> getParameters()
      Gets algorithm parameters.
      Returns:
      parameter map
    • getName

      String getName()
      Gets algorithm name.
      Returns:
      name
    • voting

      static SwarmIntelligence voting()
      Simple voting-based collective decision.

      Each agent proposes a solution, best one wins.

      Returns:
      voting intelligence
    • consensus

      static SwarmIntelligence consensus()
      Weighted averaging of agent outputs.
      Returns:
      consensus intelligence
    • bestSelection

      static SwarmIntelligence bestSelection()
      Best-of-N selection.
      Returns:
      best selection intelligence
    • antColony

      static SwarmIntelligence antColony(double pheromoneWeight, double explorationRate)
      Ant Colony Optimization style.
      Parameters:
      pheromoneWeight - weight for pheromone influence
      explorationRate - rate of random exploration
      Returns:
      ACO intelligence
    • iterativeRefinement

      static SwarmIntelligence iterativeRefinement()
      Iterative refinement where each agent improves on previous.
      Returns:
      refinement intelligence