Write a simulator in Python for the Environment as described above. The instructor will post a video that will walk you through an example reference implementation written in Scala and will explain the syntax, how to download and run it, and how it works. The reference implementation is at https://github.com/lasimon/wumpus. For this assignment you want the branch labelled naïve-agent. (Note that this reference implementation is written in functional style, but you don’t need to write yours 1 The location of the Wumpus, gold and pits are independent. The Wumpus, gold and a pit can all be in the same room. 2 Note that this means that the Wumpus produces a Stench in the square and in vertically and horizontally adjacent squares whether it is dead or alive. 3 It doesn’t matter whether the Agent is holding the gold. If the gold is in the same room, the Agent receives the percept. in the same style. Object-oriented style is also fine for your simulator. Avoid purely procedural style though as it won’t scale well for subsequent exercises.) To test the environment, also write a NaiveAgent that chooses randomly between the six possible actions (Forward, TurnLeft, TurnRight, Shoot, Grab and Climb) with uniform probability. Some notes and clarifications: • The Agent must only have access to the Percepts. The Agent should not be allowed to cheat by looking at the game board or by being able to access any other information about the state of the Environment. For example, the Agent CANNOT ask where it is, where the Wumpus is, whether there is a pit in a location, etc. In later assignments we will build Agents that will construct a “mental model” (called a Belief State) of the environment based on the Percepts received so far at each step of the game. • The Wumpus and pits don’t move during a game, but they will move from one game (also called an “episode”) to the next. • We may later want to disallow Climb entirely if the Agent doesn’t have the gold. Otherwise the Agent may learn (once we build a learning Agent) to just always leave immediately with a score of -1 given this game is so hard to win. • When an environment is initialized, provide these parameters: o width: width of the grid o height: height of the grid o allowClimbWithoutGold o pitProb: the probability of a pit being added to each square (except (1,1)) The standard game would be an initialization of (4, 4, true, 0.2). (You can add additional initialization parameters if you wish). We will experiment with larger grids later. • The Agent does not get any reward for just finding the gold. • There are all kinds of variations of the above WumpusWorld rules available on the Web. For now, we will stick to the original set of rules as defined in Russell and Norvig (except allowing for variation as allowed by the width, height, allowClimbWithoutGold, and pitProb parameters.) If you try to copy code from the Net it may not be written to use this set of rules so beware. • The rewards as described by ‘Performance Measure” above are to be considered to be granted by the Environment, not by the Agent. Return the reward as part of the percept tuple; do not generate it within the Agent. The reasons for this will become clearer later. • The squares should be numbered (as far as any user interface is concerned) as [x,y] running from [1,1] in the bottom left corner to [4,4] in the top right. (It’s okay if the Environment code internally refers to the bottom left-hand corner of the grid as [0,0] rather than [1,1] to simplify working with arrays.) • The final Percept, if and when the Agent climbs out of the maze, is not well-defined. The Agent should ignore it, and we could choose something reasonable for it, like (false, false, true if the Agent has the gold, false, false, -1 or 999 depending on whether the Agent has grabbed the gold). The final reward is very important, but the rest is of no value because the Agent can’t take any further actions at this point. • We could consider the -1 per step as being part of the Agent design rather than an environment reward but for now treat it as being determined by the Environment. • Include a simple visualizer (such as in the reference implementation) so you can see how the Environment is evolving through the game (despite the fact the Agent can’t). • Hint: When testing, try setting the pit probability to zero to see whether the simulator is working properly if the Agent grabs the gold and escapes. Even the naïve Agent should occasionally succeed.
CS 340 Milestone One Guidelines and Rubric Overview: For this assignment, you will implement the fundamental operations of create, read, update,
Retail Transaction Programming Project Project Requirements: Develop a program to emulate a purchase transaction at a retail store. This
7COM1028 Secure Systems Programming Referral Coursework: Secure
Create a GUI program that:Accepts the following from a user:Item NameItem QuantityItem PriceAllows the user to create a file to store the sales receip
CS 340 Final Project Guidelines and Rubric Overview The final project will encompass developing a web service using a software stack and impleme