Implementing a distributed real-time freeze tag game

Assignment Help Python Programming
Reference no: EM133840257

Distributed Freeze Tag Game
This coding involves implementing a distributed real-time Freeze Tag game using multiple agents that communicate over a network. One agent is designated as "It" and the rest are "NotIt" agents. The "It" agent's goal is to chase and freeze all "NotIt" agents. This challenge evaluates your ability to write clean, well-structured code and your understanding of distributed system concepts such as message passing and coordination across nodes. Can you do my assignment for me? We sure can!

What You Will Build: A Python-based simulation of Freeze Tag with distributed agents communicating via a publish/subscribe mechanism using LCM (Lightweight Communications and Marshalling). The game continues until all "NotIt" agents have been frozen by the "It" agent.

Skills Assessed:
Clean coding practices (readability, modularity, proper resource management)
Distributed systems fundamentals (concurrent agents, network communication, coordination)

Implementation Details
You will use LCM for communication between agents. We provide boilerplate code (node.py) to help structure your implementation. We also provide an example lcm message in messages.lcm. You can compile that message using instructions in lcm-gen.
Based on this, you will implement the following nodes in the system, which inherit the Node class from node.py:

Components

1. GameNode
Listens to position updates from It and NotIt nodes. Keeps track of the global states in a NxM board.
If the It node and NotIt node are in the same square, send a message to the NotIt node to freeze.
Visually represents the game state using a simple GUI.
Keep track of the number of NotIt nodes which have been frozen. If all NotIt nodes are frozen, then end the game.

2. NotItNode
Make a random move within the board boundaries every second. Publish the chosen move to the GameNode.
Stop moving immediately upon receiving a freeze message.

3. ItNode
Listen to move updates from all NotIt nodes and keep track of the global state.
Choose a move strategically, chasing NotIt nodes using any simple heuristic/algorithm of your choice.
Publish move updates to GameNode every 0.5 seconds.

Game Initialization
The simulation should run using the command-line arguments:
python game.py --width N --height M --num-not-it P --positions x1 x2 y1 y2 ... x_it y_it

Example:
python game.py --width 20 --height 15 --num-not-it 2 3 5 10 12 0 0
(Initializes a 20x15 board with two "NotIt" agents at (3,5), (10,12), and one "It" agent at (0,0))
To coordinate launching and shutdown of the nodes, we share game.py which has some boilerplate code showing how to coordinate the launch and shutdown of a node. Please fill that in to enable the simulation to launch according to the interface defined above. Make sure that on exit all the nodes exit correctly and all resources are correctly released.
Testing and Submission
Ensure each node type (GameNode, "It", and "NotIt") runs concurrently on a single machine.
Submit complete Python source code and brief instructions on how to run the simulation.
Technical Requirements
Language: Python
Communication: Use LCM for messaging via a publish/subscribe model, node.py has boilerplate code to get you started.
All agents run concurrently as separate processes on a single machine.
Clear, structured, and modular Python code.
Graceful shutdown upon receiving a game-over message or termination signals with no hanging processes.

Reference no: EM133840257

Questions Cloud

What are key points in the history and physical examination : What are key points in the history and physical examination? How would you approach differ if the patient were a sexually active 16-year-old?
Personal Legislative Agenda and Action Plan : Review the Personal Legislative Agenda and Action Plan Exemplar to demonstrate how you will construct your Personal Legislative Agenda for the state
Stronger international cooperation-harsher penalties : Stronger international cooperation, harsher penalties for traffickers, and comprehensive victim support programs are all essential steps.
Describe the role of the community health nurse : Based on your individual outbreak scenario describe the role of the community health nurse during this outbreak.
Implementing a distributed real-time freeze tag game : Implementing a distributed real-time Freeze Tag game using multiple agents that communicate over a network. One agent is designated
Analyzing data within spreadsheet : Give examples of at least two techniques or functions that can assist you when analyzing data within a spreadsheet.
Research paper on public key cryptography : Write a research paper on Public Key Cryptography. Research paper shall be a minimum of three pages, double-spaced, excluding the title page and works cited
Incorporating the TBL framework into the service industry : Explain the differences that exist between incorporating the TBL framework into the service industry and the manufacturing industry, and why
What aspects did you find most relevant to you : How was your understanding of human resource information systems changed? What aspects did you find most relevant to you? How?

Reviews

len3840257

3/11/2025 11:03:47 PM

need to give me explainantion too and guideline like read the stuff its s easy coding

Write a Review

Python Programming Questions & Answers

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd