Physical Address

304 North Cardinal St.
Dorchester Center, MA 02124

Game-playing AI with Swift for TensorFlow (S4TF) Quiz Answers

Get Game-playing AI with Swift for TensorFlow (S4TF) Quiz Answers

Machine learning technology is one of the most exciting innovations of the past few years. It enables cars to drive themselves, and oncologists to diagnose cancer faster. However, from an implementation standpoint, machine learning has traditionally been difficult. This is because machine learning simply has different needs from other types of technologies – and programming languages, the infrastructure with which technology is built, weren’t designed with these special needs in mind.

However, Swift is the perfect language for the future of machine learning. The compiler is developed in a modular paradigm, and it has 2 intermediate stages in which code can be modified or injected. With Swift for TensorFlow, Google is showing their commitment to the world of machine learning. They’re integrating machine learning capabilities directly into the Swift language compiler. This enables you to write code naturally, and run tasks like automatic differentiation. You can even use Swift’s Control Flow (if, if-let, and guard statements, for/while loops, etc.)!

All in all, this means that you’ll be able to train machine learning models, faster, with less and simpler code, enabling a lower barrier of entry into this world. To get started, enrolling in this free course on Swift and Swift for TensorFlow. You’ll build a minimax agent for Tic Tac Toe, a Reinforcement Learning agent for Cartpole, and a Monte Carlo Tree Search agent for 2048! Upon completing this course, you’ll be able to understand the ideas behind Swift for TensorFlow, the basics of machine learning, and how AI agents are built to play games.

Enroll on Cognitive Class

Module 1 – Set up your environment

Question: What kind of IBM Cloud account doesn’t require payment information and doesn’t expire?

Note: Make sure you select all of the correct options—there may be more than one!

  • Trial
  • Lite
  • Pay-as-you-go

Question: Which of the following platforms does Swift NOT run natively on?

  • Linux
  • Darwin
  • Windows
  • None of the above

Module 2 – Understanding Swift’s basics

Question: Which of the following companies did Chris Lattner work at after Apple?

Note: Make sure you select all of the correct options—there may be more than one!

  • IBM
  • Microsoft
  • Google
  • Amazon
  • Tesla

Question: For how many years was Swift in development before it was released to the public?

Answer: 4

Question: What kind of programming language is Swift?

  • Interpreted
  • Compiled to machine code
  • Compiled to byte code
  • Transpiled

Question: Which HTTP server for Swift will this course use?

  • Perfect
  • Kitura
  • Swifter
  • Vapor

Module 3 – Tic Tac Toe (Minimax)

Question: Why does our implementation of Minimax keep track of the depth of the tree?

  • Stop at a certain depth
  • Memoize game states
  • Take into account the “straightforwardness” of moves

Question: How is the tic-tac-toe board stored?

  • Row-major format
  • Column-major format

Question: If minimax started from a blank board and had to calculate the best possible move, how many board states would it evaluate? For the sake of mathematical simplicity, assume the board must be filled completely to be considered “over” – players cannot win.

  • 9!
  • 9^2
  • 9^9
  • 9*9

Question: The “minimax” function returns the best move to take for a board state.

  • True
  • False

Module 4 – Cartpole (Reinforcement Learning)

Question: The cartpole game is what kind of problem?

Answer: Inverted Pendulum

Question: The @differentiable function decorator is an example of an implementation of what technology/technique?

Answer:

Question: Why do we only train the network with the top 30% of episodes?

  • To reduce training time with fewer samples
  • To improve network performance with better samples

Question: OpenAI Gym…

Note: Make sure you select all of the correct options—there may be more than one!

  • Provides easy-to-use game enviroments to test RL agents
  • Ships with RL algorithms to use as agents

Module 5 – 2048 (Monte Carlo Tree Search)

Question: The implementation of the 2048 game logic is made fast by:

Note: Make sure you select all of the correct options—there may be more than one!

  • Using bitboards
  • Pre-calculating moves and scores for rows
  • Multi-threading

Question: Which framework did we use to enable Swift to host HTTP servers?

Answer: Kitura

Question: Monte Carlo Tree Search is…

Note: Make sure you select all of the correct options—there may be more than one!

  • Stochastic
  • Guaranteed to always give the correct answer

Question: Which swift file defines dependencies and other package details?

Answer: Package.swift

Final Exam

Question: Which tier(s) of IBM Cloud require payment information on file?

Note: Make sure you select all of the correct options—there may be more than one!

  • Lite
  • Trial
  • Pay-as-you-go

Question: Why would you want to use a single language, Swift, over many languages, each specialized for a certain task?

Note: Make sure you select all of the correct options—there may be more than one!

  • It’s easier to maintain a codebase written in a single language.
  • Swift is an expressive, performant, and open source language backed by a large company (Apple).
  • It’s slow to facilitate communication between components in different languages.
  • It reduces the amount of “reinventing the wheel” required across a codebase.

Question: Does Minimax plays perfectly all the time? If so, why?

  • It’s trained on a lot of game data and learns how to play perfectly.
  • It brute forces a solution based off of the rules of the game, and all possible future situations.
  • It’s provided optimal heuristics.
  • It doesn’t always play perfectly.

Question: Classes are passed by reference, and structs are always, indiscriminately passed by value.

  • True
  • False

Question: A computed property is…

  • A variable within a struct/class/enum.
  • A function within a struct/class/enum that’s accessed like a property.

Question: Why is Minimax penalized for looking at moves deeper into the game tree?

Note: Make sure you select all of the correct options—there may be more than one!

  • To improve performance by looking at a more shallow game tree.
  • So Minimax takes into account how straightforward a move is.
  • To make Minimax more accurate.

Question: Why is Reinforcement Learning important?

Note: Make sure you select all of the correct options—there may be more than one!

  • It’s more accurate than other training methods.
  • It can learn by trial and error.
  • It doesn’t require as much data to learn from.
  • It can play games.

Question: Swift for TensorFlow is interoperable with Python, because Python’s written in C

  • True
  • False

Question: What are some reasons Swift for TensorFlow is special?

Note: Make sure you select all of the correct options—there may be more than one!

  • Swift now has a wrapper around TensorFlow, enabling machine learning development.
  • Swift for TensorFlow can automatically differentiate complex functions.
  • Swift for TensorFlow can optimize complex tensor operations.

Question: For what reasons did we implement monte carlo tree search in a time-bounded manner?

Note: Make sure you select all of the correct options—there may be more than one!

  • To reduce the amount of time the algorithm takes to search.
  • To search game states more if they’re closer to the end of a game.
  • To make MCTS more accurate.
  • To distribute the algorithm across threads.

Conclusion:

We hope you know the correct answers to Game-playing AI with Swift for TensorFlow (S4TF) If Queslers helped you to find out the correct answers then make sure to bookmark our site for more Course Quiz Answers.

If the options are not the same then make sure to let us know by leaving it in the comments below.

Course Review:

In our experience, we suggest you enroll in this and gain some new skills from Professionals completely free and we assure you will be worth it.

This course is available on Cognitive Class for free, if you are stuck anywhere between quiz or graded assessment quiz, just visit Queslers to get all Quiz Answers and Coding Solutions.

More Courses Quiz Answers >>

Building Cloud Native and Multicloud Applications Quiz Answers

Accelerating Deep Learning with GPUs Quiz Answers

Blockchain Essentials Cognitive Class Quiz Answers

Deep Learning Fundamentals Cognitive Class Quiz Answers

Hadoop 101 Cognitive Class Answers

Machine Learning With R Cognitive Class Answers

Machine Learning with Python Cognitive Class Answers

Leave a Reply

Your email address will not be published. Required fields are marked *