8000 GitHub - feyoz/ants · GitHub
[go: up one dir, main page]

Skip to content
feyozPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

Micro Ant Ecosystem 🐜

日本語 | 简体中文

License: MIT

A browser-based 3D ant colony simulation sandbox built with Three.js. Watch ants interact, forage, and survive in a dynamic environment that can overlay any Wikipedia page.

Screenshot

Features

Ecosystem

  • Three Ant Species: Black, Red, and Brown ants, each with unique stats for speed, strength, and health.
  • Predator AI: A tarantula that stalks ants with realistic burst movement and hunting behavior.
  • Individual Variation: Each ant has unique size, color tint, and speed variations for a more organic feel.

Interaction

  • Interactive Tools: Use tools to Observe, Swat (kill), Feed (place sugar), Draw Pheromones, or Place Rocks.
  • Advanced Tuning: A parameter panel with presets (Simulation, Balanced, Fun) to control every aspect of the colony.
  • Dynamic Background: Ants crawl over a live Wikipedia iframe, which you can change to any URL.

Routing & AI (ACO/AS-inspired)

  • Priority-based Wander: WANDER uses fixed priorities (sugar -> corpse -> neighbor interaction -> pheromone -> ACO wander).
  • Carry Return Fallback: Carrying ants use trail backtracking + obstacle probes + 45-degree scan fallback.
  • Anti-loop Safety: Short tabu-style memory and deadend pheromones reduce ant-mill loops.
  • Tour Reinforcement: Successful sugar return reinforces the completed forage trail with Q/L style pheromone updates.

Visual & Audio

  • Organic Movement: Perlin noise wandering, acceleration curves, and body bobbing animations.
  • Visual Effects: Pheromone trail visualization, dust particles, and death animations.
  • Spatial Audio: Sound effects powered by the Web Audio API.

Technical

  • Zero Dependencies: Runs entirely in the browser using vanilla JavaScript and Three.js via CDN.
  • No Build Step: Just open the HTML file and play.
  • Multi-language: Supports English, Japanese, and Chinese via URL parameters (e.g., ?lang=ja).

Quick Start

  1. Clone this repository or download the source code.
  2. Open index.html directly in any modern web browser.

Alternatively, use a local server:

npx serve .

Project Structure

  • index.html: Main entry point and UI structure.
  • src/js/: Core simulation logic and Three.js implementation.
  • src/css/: UI styling and layout.

Notes

  • This is a single-file simulation core (src/js/simulation.js) with runtime tuning.
  • npm test is currently a placeholder script (no automated tests configured yet).

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0