ethicalgardeners.rendererΒΆ

The Renderer module provides visualization capabilities for the Ethical Gardeners simulation environment.

This module defines the abstract interface and concrete implementations for rendering the grid world environment. It supports:

1. Real-time visualization - displaying the environment as agents interact with it

2. Post-analysis recording - saving frames during the simulation for later video export

The module provides:

  1. Renderer: Abstract base class defining the rendering interface

  2. Two concrete implementations:

    • GraphicalRenderer: Implementation using Pygame for colorful interactive visualization

    • ConsoleRenderer: lightweight text-based display in terminal environments

Each renderer visualizes the grid world, including:

  • The physical environment (ground, obstacles)

  • Agents and their positions

  • Flowers and their growth stages

  • Pollution levels in each cell

members:

Classes

ConsoleRenderer([characters, display])

Text-based implementation of the Renderer interface.

GraphicalRenderer([cell_size, colors, ...])

Pygame-based implementation of the Renderer interface.

Renderer([display])

Abstract base class defining the interface for environment visualization.