Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Artificial Intelligence Problem: Please answer ALL PARTS OF THE QUESTION with FU

ID: 3601284 • Letter: A

Question

Artificial Intelligence Problem: Please answer ALL PARTS OF THE QUESTION with FULL EXPLANATIONS Thanks! Problem 2.1 (35 points) SIM game Write a program to play the game of SIM with eight points (labeled A-H). Again, the two players are RED and BLUE; you can assume that RED moves first by convention; each player alternately chooses an edge to "claim" for the given color; and the loser is the player who is forced to create a complete triangle of edges in their own color. Your program should play interactively against the user. It needn't involve any fancy graphics or interface, but it should play a decent and competitive game of SIM. The interaction could be entirely textual, and could look something like this: Are you playing Red? (Y/N): Y RED move: A, B BLUE move: E, G etc. Some notes: you might want to use alpha-beta pruning (it'll come in handy for the next problem anyway). In any event, whatever algorithmic strategy you use for your program, you should explain and document your approach. Since the computer program will probably not display the current state of the game (though of course it could), you may want to play against the program with a paper-and-colored-pencil representation of the game board handy. You should submit the important source code for your program i.e. the major procedures for deciding on a next move) and a sample game or two to show how it plays the game

Explanation / Answer

There's no theoretical reason why any language can't be used in any situation, but there are two factors that make this kind of mutability hard to put into practice.

First, different languages map better conceptually to different paradigms. You could, for example, mimic object-oriented behavior in C, but you'd be working against the language's design. Similarly you could write functional programs in Ruby or synchronous programs in JavaScript, but in all cases, you'd be doing yourself a disservice. Facebook famously wrote a transpiler to convert their PHP code into C++. It's not what PHP was designed for, but they did it and it works. These things can be done, but they're harder to do than using the "right tool for the right job".

The second issue is that languages don't exist in a vacuum. They come bundled with all kinds of libraries, frameworks, existing codebases and communities. People who write Ruby tend to be back-end web developers, so if you're writing Ruby and get stuck, you're much more likely to find someone who can help you with web related issues than, say, 3d graphics rendering. VB in general doesn't play well on the Mac. Again, you could write a VB to... something... transpiler that will let your VB code run natively on OS X, but why go through that trouble? C++ is very fast, but it's complex which means if you're doing something relatively simple, it's a bad choice.

So it isn't so much that any language can't do everything, it's that you really don't want to do everything with every language and in general, if you want to be a professional, one of the skills you need to get good at is learning different languages and choosing the right language for the task you want to complete.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote