Thursday, June 26, 2014

Artificial Intelligence Sample Assignment

Artificial Intelligence is focusing on making the computer systems as intelligent as a human brain but still there is a lot more to achieve. Computer seems to act like a human but still there is much functionality where computers lack in the processing as compared to the human brain. For example, computers cannot communicate as human do. Their response time in this case will be too high. If it would have been the case that computers can communicate like human then there would not be any requirements of human resources or employees of the organization, only the computer systems would have been able to do the job. This would have eliminated the requirements of receptionists, office-assistants, etc.
Likewise there are many other functions where the computer lacks in the processing speed as compared to the human brain. Human has an instant reaction to a particular action but the computers cannot respond in the similar manner. Computers are made to follow the instructions given by the human.
The reason being is that as the brain works on the concepts of neurons. And there are many neurons in the human brain and their execution ways are also different so a computer system cannot replicate the same functionality. The functionality of neurons is not known exactly to the scientists. The scientists are trying to implement the brain of a worm in a computer machine. As the neurons cannot be reduced in transistors, likewise there is a long bridge in between the functionalities of human brain and the computer system.
Answer 2
There is much advancement in computing in the past 50 years. The biggest one is related to the digital electronics computing. In 1960’s, analog slide rules were used, analog electronic computers and Arithmetic & Logic Unit were used to find out the product of two numbers. Log tables and Trigonometric values were used to do the simple calculations. These days, everything is in the form of digits and digital technology is ruling everywhere.
Parallel computing has come into the picture from more than a decade. This has increased the processing speed of the computers so complex tasks consisting of large numeric calculations can be completed in a less time as compared to the earlier processing speed. The concept of virtual memory operating system has also helped in executing the large programs in less memory space.
The most significant accomplishments of the next twenty-five years may be regarding the successful implementation of the Turing machine test where computer’s intelligence is proved successfully as compared to the intelligence of human brain. Grid computing would be possible within next twenty-five years. This would be possible because a lot of work is going on regarding Artificial Intelligence and grid computing.

Game-Plan
NIM Game is a logical game played among two-players. This game uses 2 sticks and some piles to play with. A player takes its turn on alternate basis. The piles have random number of stones in it. Player’s keeps on removing stones from the piles as their turn come on alternate basis. The winner of the game is decided on the factor that if there are no more stones left, then the player whose turn is to pick the stones from the piles will lose the game as their are no stones left so the other player would be considered as a winner. Or in the other words, the player who got the last chance to remove the stones from the piles will be the winner of this game.
So the main goal to win this game is to choose the last stick.
Hence, to be a winner, you let the other player to remove all but one pile, so that the same can be removed by you.
Game States and Illustration
Suppose there are 2 piles of stone. The players can choose any number of stones as they want from one of the piles. If any of the players cannot make any move then the player will be the loser of this game. Consider the below mentioned example:
·         Suppose the piles have 16 and 12 stones.
·         First player takes 4 stones from pile 1. So the number of remaining stones in pile 1 is now 12.
·         Second player also takes 4 stones from pile 1. The remaining stones in pile 1 are now 8.
·         Player 1 takes 2 stones from pile 2, so remaining stones in pile 2 are 10.
·         Second player also takes 6 stones from pile 2. The remaining stones in pile 2 are now 4.
·         Player 1 takes 6 stones from pile 1, so remaining stones in pile 1 are 2.
·         Second player takes 4 stones from pile 1. The remaining stones in pile 1 are now 0.
·         Player 1 takes 4 stones from pile 2, so remaining stones in pile 2 are 0.
Player 2 has no choice left so player 2 looses the game and player 1 is the winner of this game.

Algorithm:
def nim(heaps, misere=True):
        """Computes next move for Nim in a normal or misère (default) game, returns tuple (chosen_heap, nb_remove)"""
        X = reduce(lambda x,y: x^y, heaps)
        if X == 0: # Will lose unless all non-empty heaps have size one
                if max(heaps) > 1:
                        print "You will lose :("
                for i, heap in enumerate(heaps):
                        if heap > 0: # Empty any (non-empty) heap
                                chosen_heap, nb_remove = i, heap
                                break
        else:
                sums = [t^X < t for t in heaps]
                chosen_heap = sums.index(True)
                nb_remove = heaps[chosen_heap] - (heaps[chosen_heap]^X)
                heaps_twomore = 0
                for i, heap in enumerate(heaps):
                        n = heap-nb_remove if chosen_heap == i else heap
                        if n>1: heaps_twomore += 1
                # If move leaves no heap of size 2 or larger, leave an odd (misère) or even (normal) number of heaps of size 1
                if heaps_twomore == 0: 
                        chosen_heap = heaps.index(max(heaps))
                        heaps_one = sum(t==1 for t in heaps)
                        # misère (resp. normal) strategy: if it is even (resp. odd) make it odd (resp. even), else do not change
                        nb_remove = heaps[chosen_heap]-1 if heaps_one%2!=misere else heaps[chosen_heap]
        return chosen_heap, nb_remove
Computational Complexity
To check if the Nim sum is non zero, can be done in a log space time. The actual winning move can also be calculated in a log space time. There are some Nim games where it may take an exp. time to calculate the winning move. So it can also be considered as Ω(n) where n is the bit length in exponential.

References:
[1]. Andrew. (2011, January 21). Are human brains too complex to replicate? Retrieved February 15, 2013, from http://weirdthings.com: http://weirdthings.com/2011/01/are-brains-too complex-to-replicate/
[2]. Lee, T. B. (2011, January 13). Emulation, Simulation, and the Human Brain. Retrieved February 15, 2013, from http://timothyblee.com: http://timothyblee.com/2011/01/13/emulation-simulation-and-the-human-brain/
[3]. Nim: A Game Played All Over the World. (n.d.). Retrieved February 15, 2013, from http://asiasociety.org: http://asiasociety.org/education/resources-schools/elementary-lesson-plans/nim-game-played-all-over-world

[4]. Reiter, H. (n.d.). Illuminations: Fibonacci Nim. Retrieved February 15, 2013, from Illuminations: http://illuminations.nctm.org/LessonDetail.aspx?ID=L695



Your educational progress matters a lot to you, your family and to us also! That is precisely why we are available 24/7 to help you with writing assignments, homework, research, essays and projects. No matter what the subject, Math or Science, Finance or Accounting, Programming or History, you can depend on us and get customized papers written according to your instructions. All you need to do is visit us at www.sampleassignment.com.





No comments:

Post a Comment