From 5b29e0cf6171730055088e627541211932e8bb17 Mon Sep 17 00:00:00 2001 From: srajan-kiyotaka Date: Fri, 14 Jun 2024 21:29:44 +0530 Subject: [PATCH] added API Refference. --- docs/Agent.md | 13 ++++ docs/DataStructures.md | 46 +++++++++++++ docs/World.md | 15 +++++ docs/graphAgent.md | 0 docs/graphWorld.md | 114 ++++++++++++++++++++++++++++++++ docs/gridAgent.md | 80 ++++++++++++++++++++++ docs/gridWorld.md | 146 +++++++++++++++++++++++++++++++++++++++++ docs/treeAgent.md | 0 docs/treeWorld.md | 92 ++++++++++++++++++++++++++ traverseCraft/world.py | 1 + 10 files changed, 507 insertions(+) create mode 100644 docs/Agent.md create mode 100644 docs/DataStructures.md create mode 100644 docs/World.md create mode 100644 docs/graphAgent.md create mode 100644 docs/graphWorld.md create mode 100644 docs/gridAgent.md create mode 100644 docs/gridWorld.md create mode 100644 docs/treeAgent.md create mode 100644 docs/treeWorld.md diff --git a/docs/Agent.md b/docs/Agent.md new file mode 100644 index 0000000..4225577 --- /dev/null +++ b/docs/Agent.md @@ -0,0 +1,13 @@ +# Agent Module API Reference + +## Overview + +The Agent module provides implementations for different types of agents that operate in various environments. + +### Classes + +- **GridAgent**: Represents an agent designed to navigate and perform actions within a grid-based environment. For detailed information on the `GridAgent` class and its methods, refer to [GridAgent Documentation](./gridAgent.md). + +- **TreeAgent**: Represents an agent specifically designed to navigate and manipulate tree structures. For detailed information on the `TreeAgent` class and its methods, refer to [TreeAgent Documentation](./treeAgent.md). + +- **GraphAgent**: Represents an agent specialized in navigating and interacting with graph-based environments. For detailed information on the `GraphAgent` class and its methods, refer to [GraphAgent Documentation](graphAgent.md). diff --git a/docs/DataStructures.md b/docs/DataStructures.md new file mode 100644 index 0000000..c6d515e --- /dev/null +++ b/docs/DataStructures.md @@ -0,0 +1,46 @@ +# Data Structures Module + +The Data Structures module provides fundamental classes for constructing and manipulating tree and graph structures used within the World module. + +## TreeNode Class + +The `TreeNode` class represents a node in a tree structure. It encapsulates the following attributes: + +- `id` (int or str): Unique identifier for the node. +- `val` (any, optional): Value associated with the node. Defaults to `label` if not provided. +- `children` (list of TreeNode objects): List of child nodes. +- `edges` (list of int or float, optional): List of edge weights corresponding to each child node. Defaults to a list of 1s if not provided and children are present. +- `isGoalState` (bool): Indicates if the node is a goal state. +- `_heatMapValue` (int): Internal attribute used for heat map visualization (default is 0). + +### Methods + +- `__init__(self, label, children: list, val=None, isGoalState: bool = False, edges: list = [])`: Initializes a TreeNode instance. +- `__str__(self) -> str`: Returns a string representation of the TreeNode object. + +The `TreeNode` class is used extensively in the World module to build hierarchical tree structures. Users can instantiate `TreeNode` objects and customize them by inheriting from the class to add additional attributes or methods tailored to specific applications. + +## GraphNode Class + +The `GraphNode` class represents a node in a graph structure. It encapsulates the following attributes: + +- `id` (int or str): Unique identifier for the node. +- `val` (any, optional): Value associated with the node. Defaults to `label` if not provided. +- `neighbors` (list of GraphNode objects): List of neighboring nodes. +- `edges` (list of int or float, optional): List of edge weights corresponding to each neighboring node. Defaults to a list of 1s if not provided and neighbors are present. +- `isGoalState` (bool): Indicates if the node is a goal state. +- `_heatMapValue` (int): Internal attribute used for heat map visualization (default is 0). + +### Methods + +- `__init__(self, label, neighbors: list, val=None, isGoalState: bool = False, edges: list = [])`: Initializes a GraphNode instance. +- `__str__(self) -> str`: Returns a string representation of the GraphNode object. + +The `GraphNode` class is used in the World module to construct complex networked structures. Users can instantiate `GraphNode` objects and extend their functionality by inheriting from the class to introduce additional attributes or methods specific to their needs. + +## Customization + +These classes provide a solid foundation for creating and manipulating tree and graph structures within the World module. For specialized requirements, users are encouraged to inherit from `TreeNode` and `GraphNode` classes to tailor them according to specific application scenarios. + +By leveraging these customizable data structures, developers can effectively manage and visualize complex relationships within their simulated environments. + diff --git a/docs/World.md b/docs/World.md new file mode 100644 index 0000000..e630990 --- /dev/null +++ b/docs/World.md @@ -0,0 +1,15 @@ +# World Module API Reference + +The `world` module provides functionalities to create and manage different types of worlds using Tkinter-based GUI components. + +## Functions + +### `getScreenSize() -> tuple` + +Returns the screen size for any operating system. + +**Raises:** +- `NotImplementedError`: If the operating system is not supported. + +**Returns:** +- `tuple`: A tuple containing the width and height of the screen. \ No newline at end of file diff --git a/docs/graphAgent.md b/docs/graphAgent.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/graphWorld.md b/docs/graphWorld.md new file mode 100644 index 0000000..2ac5b28 --- /dev/null +++ b/docs/graphWorld.md @@ -0,0 +1,114 @@ +# API Reference: CreateGraphWorld Class + +Class representing a graph world. + +## Constructor + +### `__init__(self, worldName: str, worldInfo: dict, radius: int = 20, fontSize: int = 12, fontBold: bool = True, fontItalic: bool = True, nodeColor: str = "gray", goalColor: str = "green", width: int = SCREEN_WIDTH, height: int = SCREEN_HEIGHT, lineThickness: int = 2, arrowShape: tuple = (10, 12, 5), buttonBgColor: str = "#7FC7D9", buttonFgColor: str = "#332941", textFont: str = "Helvetica", textSize: int = 24, textWeight: str = "bold", buttonText: str = "Start Agent", logoPath: str = None)` + +The constructor method for CreateGraphWorld, which initializes an instance of the class representing a graph world. It takes various parameters such as worldName, worldInfo, and optional parameters for visualization settings like radius, fontSize, and nodeColor. It sets up the graphical representation of the world using Tkinter for visualization and constructs the graph data structure based on the provided worldInfo. + +#### Parameters + +- `worldName` (str): The name of the world. +- `worldInfo` (dict): Dictionary containing information about the world. + - 'goals' (list): List of goal node IDs. + - 'adj' (dict): Adjacency list representing graph connections. + - 'position' (dict): Dictionary of node positions with node IDs as keys. + - 'edges' (dict, optional): Dictionary of edge information. Default is None. + - 'vals' (dict, optional): Dictionary of node values. Default is None. +- `radius` (int): Radius of nodes in the visualization. Default is 20. +- `fontSize` (int): Font size for node labels. Default is 12. +- `fontBold` (bool): Whether node labels are bold. Default is True. +- `fontItalic` (bool): Whether node labels are italic. Default is True. +- `nodeColor` (str): Color of nodes. Default is "gray". +- `goalColor` (str): Color of goal nodes. Default is "green". +- `width` (int): Width of the visualization canvas. Default is SCREEN_WIDTH. +- `height` (int): Height of the visualization canvas. Default is SCREEN_HEIGHT. +- `lineThickness` (int): Thickness of lines connecting nodes. Default is 2. +- `arrowShape` (tuple): Shape of arrows indicating edge directions. Default is (10, 12, 5). +- `buttonBgColor` (str): Background color of buttons. Default is "#7FC7D9". +- `buttonFgColor` (str): Foreground color of buttons. Default is "#332941". +- `textFont` (str): Font family of button text. Default is "Helvetica". +- `textSize` (int): Font size of button text. Default is 24. +- `textWeight` (str): Font weight of button text. Default is "bold". +- `buttonText` (str): Text displayed on buttons. Default is "Start Agent". +- `logoPath` (str, optional): File path to the logo image. Default is None. + +#### Attributes + +- `worldID` (str): Class identifier for the graph world. +- `nodeMap` (dict): Dictionary mapping node IDs to canvas objects. +- `root` (TreeNode): The root of the graph data structure. + +## Methods + +### `aboutWorld()` + +Generates and returns a detailed textual representation of the attributes of the graph world. It uses the PrettyTable library to organize and present information such as world name, node colors, button settings, and visualization dimensions in a tabular format. + +#### Returns + +- `str`: The attributes of the world. + +### `summary()` + +Creates a summary of the graph world by generating a table that lists each node ID along with its corresponding number of visits. This method is particularly useful for visualizing statistical data related to the exploration of nodes within the graph. + +#### Returns + +- `str`: The summary of the world. + +### `constructWorld()` + +Initiates the process of constructing the graphical representation of the graph world. It calls internal methods _drawEdges, _drawNodes, and _addStartButton to draw edges between nodes, visualize nodes themselves, and add a start button for agent interaction. + +### `changeNodeColor(nodeId: int, color: str)` + +Changes the color of a specific node identified by nodeId to the new color specified by color. This method updates the visual representation on the canvas by modifying the fill color of the corresponding node object. + +#### Parameters + +- `nodeId` (int): ID of the node to change the color of. +- `color` (str): New color to set for the node. + +### `changeNodeText(nodeId: int, newText: str)` + +Updates the text displayed on a node identified by nodeId to newText. This method modifies the text attribute of the node label object associated with the specified node on the visualization canvas. + +#### Parameters + +- `nodeId` (int): ID of the node to change the text of. +- `newText` (str): New text to set for the node. + +### `getNode(nodeId: int)` + +Retrieves and returns the node object corresponding to the provided nodeId. This method is useful for accessing specific nodes within the graph world, allowing external components or agents to interact with individual nodes directly. + +#### Parameters + +- `nodeId` (int): ID of the node to retrieve the pointer for. + +#### Returns + +- `Node`: Pointer to the node with the given `nodeId`. + +### `setAgent(agent: Agent)` + +Sets the agent that will interact with the graph world. The agent parameter should be an instance of an agent class capable of running algorithms within the context of the graph world. This method prepares the environment for agent-based simulations or algorithms. + +#### Parameters + +- `agent` (Agent): The agent to be set. + +### `showWorld()` + +Displays the constructed graph world visualization to the user. This method starts the main event loop of the Tkinter application, allowing the graphical user interface (GUI) to render and remain interactive until the user closes the window or exits the application. + +### `__str__()` + +This method returns a string that describes the attributes of the graph world. It utilizes the aboutWorld() method to generate a human-readable summary of the key attributes such as world name, dimensions, node colors, and button settings. + +#### Returns + +- `str`: The attributes of the world. diff --git a/docs/gridAgent.md b/docs/gridAgent.md new file mode 100644 index 0000000..214dc22 --- /dev/null +++ b/docs/gridAgent.md @@ -0,0 +1,80 @@ +# GridAgent Class + +The `GridAgent` class represents an agent that operates within a grid world environment. + +## Parameters + +- `world` (CreateGridWorld): The grid world object in which the agent operates. +- `agentName` (str): The name of the agent. +- `agentColor` (str, optional): The color of the agent. Defaults to "blue". +- `heatMapView` (bool, optional): Whether to enable the heat map view. Defaults to True. +- `heatMapColor` (str, optional): The color of the heat map. Defaults to "#FFA732". +- `agentPos` (tuple, optional): The initial position of the agent. Defaults to (0, 0). +- `heatGradient` (float, optional): The gradient value for the heat map. Defaults to 0.05. + +## Attributes + +- `algorithmCallBack` (function): Callback function for the agent's algorithm. + +## Public Methods + +### `__str__()` + +Returns a string describing the attributes of the agent. + +### `aboutAgent()` + +Prints information about the agent including its name, color, and the world it operates in. + +### `summary()` + +Returns a summary of the agent's run including start time, end time, and elapsed time. + +### `setStartState(i: int, j: int)` + +Sets the start state of the agent to the specified position (i, j) on the grid world. + +- Raises `ValueError` if the specified start position is invalid. + +### `setAlgorithmCallBack(algorithmCallBack: function)` + +Sets the callback function for the agent's algorithm. + +### `runAlgorithm()` + +Executes the callback function set by `setAlgorithmCallBack()`. Raises `ValueError` if the callback function is not set. + +### `getHeatMapColor(value: float)` + +Maps a numeric value to a color on the heat map. + +- Args: + - `value` (float): The value to be mapped. + +- Returns: + - `str`: The RGB color string representing the mapped value on the heat map. + +### `moveAgent(i: int, j: int, delay: float=0.5)` + +Moves the agent to the specified position (i, j) on the grid world. + +- Args: + - `i` (int): The row index of the target position. + - `j` (int): The column index of the target position. + - `delay` (float, optional): The delay in seconds before moving the agent. Defaults to 0.5 seconds. + +- Returns: + - `bool`: True if the agent successfully moves to the target position, False otherwise. + +### Internal Methods + +These methods are not intended to be directly called by users but support the functionality of the class: + +- `_warmerColor(color: str, sValue: float)`: Generates a warmer color from the given color based on saturation value. +- `checkGoalState(i: int, j: int)`: Checks if the specified position (i, j) on the grid world is a goal state. +- `checkBlockState(i: int, j: int)`: Checks if the specified position (i, j) on the grid world is blocked or empty. + + +## Usage + +The `GridAgent` class provides methods to control the agent's movement within a grid world, interact with its environment, and visualize heat maps. It serves as a foundation for implementing agent-based simulations and experiments within defined grid-based environments. diff --git a/docs/gridWorld.md b/docs/gridWorld.md new file mode 100644 index 0000000..508373a --- /dev/null +++ b/docs/gridWorld.md @@ -0,0 +1,146 @@ +# API Reference for `CreateGridWorld` Class + +Class representing the world created using grids. + +## Attributes + +- `setOfCoordinates`: `List[List[int]]` +- `coordinate`: `List[int]` +- `worldID`: `"GRIDWORLD"` + +## Constructor + +### `__init__(self, worldName:str, rows:int, cols:int, cellSize:int=10, pathColor:str="gray", blockColor:str="red", goalColor:str="green", cellPadding:int=2, borderWidth:int=1, buttonBgColor:str="#7FC7D9", buttonFgColor:str="#332941", textFont:str="Helvetica", textSize:int=24, textWeight:str="bold", buttonText:str="Start Agent", logoPath:str=None)` + +The constructor initializes an instance of the CreateGridWorld class, setting up various attributes that define the world. It takes parameters such as worldName (the name of the world), rows (number of rows in the grid), cols (number of columns in the grid), and optional parameters for visual aspects like cell size, colors for paths, blocks, and goals, button appearance, and a logo image path. The constructor also validates input parameters to ensure they fall within acceptable ranges or have sensible defaults. + +#### Parameters + +- `worldName` (`str`): The name of the world. +- `rows` (`int`): The number of rows in the world (between 1 and 1000). +- `cols` (`int`): The number of columns in the world (between 1 and 1000). +- `cellSize` (`int`, optional): Size of each cell in pixels (default: 10, between 10 and 50). +- `pathColor` (`str`, optional): Color of path cells (default: "gray"). +- `blockColor` (`str`, optional): Color of block cells (default: "red"). +- `goalColor` (`str`, optional): Color of goal cells (default: "green"). +- `cellPadding` (`int`, optional): Padding around each cell in pixels (default: 2). +- `borderWidth` (`int`, optional): Width of cell borders in pixels (default: 1). +- `buttonBgColor` (`str`, optional): Background color of the button (default: "#7FC7D9"). +- `buttonFgColor` (`str`, optional): Foreground color of the button (default: "#332941"). +- `textFont` (`str`, optional): Font of the button text (default: "Helvetica"). +- `textSize` (`int`, optional): Size of the button text (default: 24). +- `textWeight` (`str`, optional): Weight of the button text (default: "bold"). +- `buttonText` (`str`, optional): Text displayed on the button (default: "Start Agent"). +- `logoPath` (`str`, optional): Path to the logo image. + +#### Raises + +- `ValueError`: If rows or columns are out of valid range. + +## Methods + +### `aboutWorld(self)` + +This method returns a textual description of the world's attributes in a tabular format using the PrettyTable library. It provides details such as the world name, dimensions (rows and columns), cell size, window size, colors for paths, blocks, and goals, as well as button properties like background color, text font, size, and weight. + +#### Parameters + +- `None` + +#### Returns + +- `str`: Description of the world attributes. + +### `summary(self)` + +Generates a summary of the world's grid configuration as a tabular format using PrettyTable. It lists out each cell in the grid along with its corresponding value. This method is useful for debugging and visualizing the initial state of the world. + +#### Parameters + +- `None` + +#### Returns + +- `str`: Summary of the world. + +### `constructWorld(self)` + +This method constructs the graphical user interface (GUI) representation of the world. It initializes the window with the specified dimensions and title, creates cells for each row and column in the grid, sets up event handling for cell toggling (click to block/unblock cells), adds goal cells if provided, and creates a start button for running the agent's algorithm. + +#### Parameters + +- `None` + +#### Returns + +- `None` + +### `addBlockPath(self, blockCells:setOfCoordinates)` + +Adds block cells to the world grid, which are cells that cannot be traversed by an agent. It takes a set of coordinates representing the block cells and visually updates the grid to reflect these changes by coloring the corresponding cells in red. + +#### Parameters + +- `blockCells` (`setOfCoordinates`): Set of coordinates representing block cells. + +#### Returns + +- `None` + +### `addGoalState(self, goalState:setOfCoordinates)` + +Adds goal cells to the world grid, which represents the target states an agent aims to reach. It takes a set of coordinates representing the goal cells and updates the grid by coloring these cells in green to visually differentiate them from other cells. + +#### Parameters + +- `goalState` (`setOfCoordinates`): Set of coordinates representing goal cells. + +#### Returns + +- `None` + +### `setAgent(self, agent)` + +Sets the agent object that will interact with the world. The agent object passed as an argument should have methods and attributes necessary for running algorithms within the world environment. + +#### Parameters + +- `agent` (`Agent`): Agent object to set. + +#### Returns + +- `None` + +### `updateWorld(self)` + +Updates the graphical representation of the world in the GUI. It iterates over each cell in the grid and ensures they are correctly positioned using the grid layout manager. This method is essential for reflecting any changes made to the world, such as adding or removing blocks/goals. + +#### Parameters + +- `None` + +#### Returns + +- `None` + +### `showWorld(self)` + +Starts the GUI main loop, displaying the constructed world to the user. This method keeps the GUI window open and responsive, allowing interaction with the grid and start button. + +#### Parameters + +- `None` + +#### Returns + +- `None` + +### Private Methods + +Private methods in Python classes are prefixed with an underscore _. These methods are not meant to be accessed directly from outside the class but are utilized internally for implementation details: + + +- `_setWindowIcon(self, logoPath)`: Sets the window icon using the provided logo path. +- `_toggleCell(self, event, i, j)`: Handles the click event on a cell, toggling its color between path color and block color based on its current state. +- `_startAgent(self)`: Initiates the agent's algorithm execution in a separate thread upon clicking the start button. +- `_disableCellToggle(self)`: Disables the functionality of toggling cell colors, typically called when the agent is running to prevent interference with the algorithm. diff --git a/docs/treeAgent.md b/docs/treeAgent.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/treeWorld.md b/docs/treeWorld.md new file mode 100644 index 0000000..ae14ba5 --- /dev/null +++ b/docs/treeWorld.md @@ -0,0 +1,92 @@ +# Tree World + +Class representing a tree world. + +## Parameters + +- **worldName (str)**: The name of the world. +- **worldInfo (dict)**: A dictionary containing information about the world. + - 'root' (str): The ID of the root node. + - 'goals' (list): List of goal node IDs. + - 'adj' (dict): Adjacency list representing tree connections. + - 'position' (dict): Dictionary of node positions with node IDs as keys. + - 'edges' (dict, optional): Dictionary of edge information. Default is None. + - 'vals' (dict, optional): Dictionary of node values. Default is None. +- **radius (int)**: The radius of the nodes in the world visualization. Default is 20. +- **fontSize (int)**: The font size of the node labels. Default is 12. +- **fontBold (bool)**: Whether to use bold font for the node labels. Default is True. +- **fontItalic (bool)**: Whether to use italic font for the node labels. Default is True. +- **nodeColor (str)**: The color of the nodes. Default is "gray". +- **rootColor (str)**: The color of the root node. Default is "red". +- **goalColor (str)**: The color of the goal nodes. Default is "green". +- **width (int)**: The width of the world visualization canvas. Default is SCREEN_WIDTH. +- **height (int)**: The height of the world visualization canvas. Default is SCREEN_HEIGHT. +- **lineThickness (int)**: The thickness of the lines connecting the nodes. Default is 2. +- **arrowShape (tuple)**: The shape of the arrows indicating the direction of the edges. Default is (10, 12, 5). +- **buttonBgColor (str)**: The background color of the buttons. Default is "#7FC7D9". +- **buttonFgColor (str)**: The foreground color of the buttons. Default is "#332941". +- **textFont (str)**: The font family of the button text. Default is "Helvetica". +- **textSize (int)**: The font size of the button text. Default is 24. +- **textWeight (str)**: The font weight of the button text. Default is "bold". +- **buttonText (str)**: The text displayed on the buttons. Default is "Start Agent". +- **logoPath (str, optional)**: The file path to the logo image. Default is "design 1.png". + +## Attributes + +- **worldID (str)**: Class identifier for the tree world. +- **nodeMap (dict)**: Dictionary mapping node IDs to canvas objects. +- **root**: The root of the tree data structure. +- **_agent**: The agent in the world. + +## Methods + +### `__init__(self, worldName, worldInfo, radius=20, fontSize=12, fontBold=True, fontItalic=True, nodeColor="gray", rootColor="red", goalColor="green", width=SCREEN_WIDTH, height=SCREEN_HEIGHT, lineThickness=2, arrowShape=(10, 12, 5), buttonBgColor="#7FC7D9", buttonFgColor="#332941", textFont="Helvetica", textSize=24, textWeight="bold", buttonText="Start Agent", logoPath=None)` + +The initializer method sets up the attributes of the CreateTreeWorld class. It takes parameters such as worldName (the name of the world), worldInfo (a dictionary containing essential information about the world like root node, goal nodes, adjacency list, and node positions), and various visual and UI parameters for rendering the world. It initializes the canvas, constructs the tree data structure, and prepares the GUI elements like buttons and node representations. + +### `aboutWorld()` + +This method generates a textual description of the attributes of the world. It creates a formatted table using PrettyTable library, listing details such as the world name, root node ID, goal nodes, visualization parameters (radius, colors, font settings), and UI configurations (button colors, text attributes). + +### `summary()` + +The summary() method provides a concise overview of the world by displaying the number of visits to each node. It uses PrettyTable to create a table listing each node ID along with its corresponding visit count. + +### `constructWorld()` + +This method constructs the visual representation of the tree world. It calls private methods _drawEdges(), _drawNodes(), and _addStartButton() to render edges, nodes, and UI controls on the canvas. + + +### `changeNodeColor(nodeId, color)` + +Allows changing the color of a specific node identified by nodeId on the canvas to the specified color. This method updates the visual representation of the node in the tree world. + +- **nodeId (int)**: The ID of the node to change the color of. +- **color (str)**: The new color to set for the node. + +### `changeNodeText(nodeId, newText)` + +Enables updating the text label of a specific node identified by nodeId on the canvas to the provided newText. This method modifies the displayed text associated with the node. + +- **nodeId (int)**: The ID of the node to change the text of. +- **newText (str)**: The new text to set for the node. + +### `getNode(nodeId)` + +Returns the pointer to the node object with the given nodeId. This method facilitates access to specific nodes within the tree data structure based on their unique identifiers. + +- **nodeId**: The ID of the node to retrieve the pointer for. + +### `setAgent(agent)` + +Sets the agent (if applicable) that will interact with the tree world. The agent can be a separate class responsible for algorithmic operations or simulations within the world. + +- **agent (Agent)**: The agent to be set. + +### `showWorld()` + +Starts the graphical user interface (GUI) main loop, displaying the constructed tree world and allowing user interaction through the Tkinter window. + +### `__str__()` + +Provides a string representation of the CreateTreeWorld instance, summarizing its attributes and configurations. It calls aboutWorld() internally to generate this textual description. diff --git a/traverseCraft/world.py b/traverseCraft/world.py index fa67c1c..58aa238 100644 --- a/traverseCraft/world.py +++ b/traverseCraft/world.py @@ -73,6 +73,7 @@ class CreateGridWorld: _buttonText (str): The text displayed on the button. Defaults to "Start Agent". _root (Tk): The root window of the world. _agent (Agent): The agent object. + _logoPath (str): The path to the logo image. """ setOfCoordinates = List[List[int]] coordinate = List[int]