SYS611A HW1

pdf

School

Stevens Institute Of Technology *

*We aren’t endorsed by this school

Course

611

Subject

Computer Science

Date

Dec 6, 2023

Type

pdf

Pages

6

Uploaded by AdmiralLionMaster307

Report
Stevens Institute of Technology SYS-611 Homework Cover Sheet Date: HW #: Author: Collaborators:
Stevens Institute of Technology SYS-611 Homework #1 Due Sep. 14 2022 Submit the following using the online submission system: 1) Cover sheet with name, date, and collaborators, 2) Written responses in PDF format, 3) All work (e.g. .xlsx or .py files). 1.1 Systems Modeling and Simulation [5 points] System Experiment with the actual system Experiment with a model of the system Physical model Mathematical model Analytical solution Simulation Figure 1.1: Ways to study a system (from Law and Kelton, 2000, p. 4). Imagine Stevens is considering constructing a new academic building on the corner of 5th Street and Sinatra Drive. A new building would alleviate space constraints on research and educational activities; however, it would also add significant debt and in- terest payments to the budget. You have been contracted to study this problem by the Board of Trustees. Figure 1.1 shows several approaches to study a system that you are considering. (a) 2 pts Identify a part of the problem that could be studied using an example of non-simulation analysis (actual system, physical model, or an- alytical model) and explain why. (b) 2 pts Identify a part of the problem that could be studied using an example of simulation anal- ysis and explain why. (c) 1 pt For your simulation analysis example given above, describe whether it should be static/dynamic and deterministic/stochastic and explain why. 1.2 Interacting with Model State [8 points] This question builds on the Tic-Tac-Toe model developed in class. (a) 2 pts Using words, explain the logic that determines whether a Tic-Tac-Toe model state contains a winner. (b) 2 pts Implement the Tic-Tac-Toe get winner derived state function in a computa- tional modeling tool (e.g. Python or Excel). Inspect the model state and display the string "x" or "o" if there is a winner, otherwise display a blank string "" . Copyright c 2022 Paul T. Grogan 1 Creative Commons BY-NC 4.0 License
(c) 2 pts Using words, explain the logic that determines whether a Tic-Tac-Toe model state contains a tie. (d) 2 pts Implement the Tic-Tac-Toe is tie derived state function in a modeling tool (e.g. Python or Excel). Inspect the model state and display a boolean True or False . 1.3 Modeling a Board Game as a Simulation [12 points] Chess is a very old board game described as 1 : a two-player, abstract strategy board game that represents medieval warfare on an 8x8 board with alternating light and dark squares. Opposing pieces, tradi- tionally designated White and Black, are initially lined up on either side. Each type of piece has a unique form of movement and capturing occurs when a piece, via its movement, occupies the square of an opposing piece. Players take turns moving one of their pieces in an attempt to capture, attack, defend, or develop their positions. Chess games can end in checkmate, resignation, or one of several types of draws. (a) 3 pts What is the elementary model state for chess? Describe it in su ffi cient detail to allow someone to create a mathematical (symbolic) model. ( hint: what information is required to “save” a game and later recreate it? It may help to reference an image. ) (b) 4 pts Using words, explain the logic that determines the following derived state func- tions for chess in terms of the elementary state in (a): (i) get num pieces which counts the number of remaining pieces owned by a player. (ii) get valid moves rook which lists cells to which a particular rook could move. (iii) is check which determines if the current player is in “check” (king under attack). (iv) is checkmate which determines if the current player has lost. (c) 3 pts Using words, describe how following state changes modify the elementary state in terms of variables in (a): (i) capture piece : Captures one of the opponent’s pieces (ii) move piece : Moves one’s own piece to a new cell (iii) promote pawn : Promote a pawn that has reached the last row (you may need to research this rule) (d) 2 pts Draw an activity diagram to show the chess game progression from start to end with the following simplified set of actions: choose valid move , capture piece , move piece , next player turn and derived state variables: is move capture (checks if a move results in a capture), is checkmate 1 https://boardgamegeek.com/boardgame/171/chess Copyright c 2022 Paul T. Grogan 2 Creative Commons BY-NC 4.0 License
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help