Describe one (1) scenario not mentioned in the textbook in which the use of an a
ID: 3839677 • Letter: D
Question
Describe one (1) scenario not mentioned in the textbook in which the use of an array would be a plausible solution. Support your response with an example of the described use of the array.
Consider a turn-based “board” game like Connect4, and analyze the manner in which recursion can be used to allow a computer to play such games. Give your opinion of whether or not you believe the computer has an advantage over the human. Provide a rationale for your response.
Suggest at least two (2) additional games in which recursion would play a role and two (2) additional games in which recursion would not play a role. Justify your response.
Explanation / Answer
you use array all the time in programming.whenever you want to keep track of an order list of items.youwill use an array:a list of song,a list of each key stroke user click.you can often use an arrayto hold a list of objects.
data function provide a differnet functionality :they let you keep data over time you can update data ,can retrive it,and also view it using other computer web browser.
arrays are huge part of java script programming. in fact most programming language have arrays.
considering the example of graphing scripts, in graphing script we can make use of array to avoid long methods.in graphing scipt we can make use of array to define data point in graph instead of giving particlar point. so in this case the use of array is plausible.
as we know computer make our life more easy.while playing on computer it makes very easy to us to play without any problem.recursion is critical because it allows you to progressively redefine data and handle data in samller and smaller chunks
best example of use of recursion is -CHESS.most good chess ai attemt to what move the opponant will make.usually it will predict all the possible move for the next turn. then it will predict all the possible move for the turn after that and so on. After that it rank all possible move using some sort of value algorithm and then each sequence of move given all over score and AI pick one with high score.
example in which recursion play an important role:
1.CHESS.
2.tic toc toe
in this game there are some possible move. In first some moves of game asuming the player goes first the program would use recursion to access all 8 follow up moves with all follow up reply move
games in which recursion would not play a role
1.super mario
2.pac man