Implement a simulation of langtons ant

Assignment Help Computer Engineering
Reference no: EM132164374

Using C++ design, implement, and test a program that implements a simulation of Langton's Ant. Note that it can be considered as a cellular automaton.

This means that you have an array or matrix of cells. Each turn or step, the value of each cell may change based upon a simple rule.

For the Ant there are two simple rules. The rules are:

1. In a white square, turn right 90o and change the square to black.

2. In a black square, turn left 90o and change the square to white.

Use a blank character for a white space. You can use the number sign ("#") for black. And for the Ant? An asterisk ("*"). ? Left ? Right?

Those are relative directions! How are you going to keep track of the direction the Ant is facing? How will you "remember" what color the current cell occupied by the Ant is or was? You will create an Ant class to help organize, hold, and manipulate this information.

Program will prompt the user to enter the number of rows and columns for the 2D array. You should also prompt the user for the number of steps.

Suggest values to the user. Your program should display each step. Use functional decomposition to develop functions to validate the input.

What parameters and criteria do these functions need? You should start by asking the user for the starting location of the Ant.

You should add the option for the user to have a random starting location. For testing purposes, always start the Ant at the same location.

Then try different locations. You should start saving utility functions for future programs you write.

Reference no: EM132164374

Questions Cloud

Illustrate the effectiveness of the organization : Research at least five peer-reviewed articles from academic journals, government sources, or research institutions (e.g. Rand) to detail the police organization
Display current will display the first and last name : A Simple program is needed to keep track phone numbers. This program should allow you to enter a contact name and find that contact's phone number.
Identify the claim and state h0 and ha : (a) Identify the claim and state H0 and Ha. Which is the correct claim? below? What are H0 and Ha??
Identify the ethical dilemma raised by the facts : Identify the ethical dilemma raised by the facts and explain what the ethical dilemma is. What makes this dilemma ethical? What ethics does this dilemma.
Implement a simulation of langtons ant : Design, implement, and test a program that implements a simulation of Langton's Ant. Note that it can be considered as a cellular automaton.
Find a test statistic of the proportion : The claim is that the proportion of challenges that are successful is greater than one-third. Find a test statistic of the proportion.
What are the daily tasks that case managers are expected : What are the daily tasks that case managers are expected to perform? What are the additional or ancillary tasks that case managers might be expected to perform?
Estimate the level of significance : Using the F table, estimate the level of significance for each. Indicate whether its likelihood of occurring is greater than or less than a p level shown on the
Develop the class polynomial : Develop the class Polynomial. The internal representation of a Polynomial is an array of terms. Each term contains a coefficient and an exponent.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

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