Transcript
Page 1: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Nicholas CrabtreeJiang Jiang LiuThinking Speaking Writing 1172November 29, 2010

Page 2: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Scratch Program Runner

A Demonstration of Artificial Intelligence and Computational

Thinking

Page 3: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Topics to discuss

• Scratch for new users• Introduce the topic of Artificial Intelligence• Demonstrate the different parts of the scratch

program so that students understand it• Explain how the program shows AI in action• Explain Computational thinking

Page 4: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Scratch Into

• What is Scratch?• Scratch is a programming language that easy

to use for all.• It uses simple drag and drop style

programming so that the user can easily see and create their programs.

Page 5: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

What is Artificial Intelligence

• Definition- AI or artificial intelligence is the name given to a computerized mind that consists entirely of programming code.

• In simpler terms it is something that can work on its own without Human Intervention, because it entirely runs off of code.

Page 6: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

What is Computational Thinking

• Computational thinking is how we think analytically. It builds upon the power and limits of computing processes. It confronts the riddle of what can Humans do better than computers and what can computers do better than humans.

• In laymens terms, it simply means our deep thinking or technical thought.

Page 7: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Scratch Program “Runner”• Following this slide is a simple scratch program called “Runner” the

object of this program is to show how AI looks and operates and the use of Computational Thinking.

• The program takes a user controlled object, called a sprite, in this case it is a car, and allows the user to maneuver it into the black area where the user scores. However, there are AI players that move back and forth in its path, so be carefull. Because if one is touched you lose a life and you only have 3. This program also utilizes Computational Thinking; it allows a user to scan the game field and decide how it would be best to score. While playing without losing lives and in its coding it was well through out and shows how computer players operate and how humans operate against them.

Page 8: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Stage Script

Page 9: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Computational Thinking

The part that shows analytical thinking the most is the Stage Script. When it asks for a passcode it challenges the user to use his or her brain by creating a simple riddle-like question and it allows the user to think out what they want to say to the computer whether the answer is “yes” or “no”.

Page 10: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Stage Script Continued

Page 11: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Sword 1 Sprite

Page 12: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Sprite 2, and 3• Please note sprites 2, and 3 are identical to 1 except that they

are set to different positions. Where sprite 1 is (X:-228 and y:-75) sprite 2 is (X: -224 and y:2), and sprite 3 (X:-208 and y:-31)

• Also note that these three sprites are the AI that moves back and forth in the program. They simply run off code that makes them slide back and forth at random speeds and if they are touched the player loses a life. As one can see, they are not being ran by a human, but off of code. These Sprites also show Computational thinking. They show a well thought-out code to program them to act a certain way in the program. Although they can only think a programmed way compared to the human player whom can move in any direction.

Page 13: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Car Sprite

Page 14: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Computational Thinking in Car Sprite

This part of the program is perhaps the must fundamentally sound it sets up the user control of the sprite called “car”. And it allows the user when playing the program to use their mind to get passed the AI sprites. In the program by allowing the player to go left, right, down, and up. It also sets up a way for the player to score whenever the player touches the color black which is at the top of the both backgrounds.

Page 15: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Game Over Sprite

Page 16: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Wall Sprite

Page 17: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Sword6 Sprite

Page 18: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Sword 7• Please note Sword 7’s script is identical to Sword 6’s

except where its point of origin is Sword 7 (X: -214 and Y:138) and sword 6 (X: -214 and Y:136)

• These are also AI set up by the programming code. They are unique from sprites 1, 2 ,and 3 in that they initially hide for 25 seconds and then they appear using the look block piece in scratch “show.” This makes them visible, and instead of using the glide feature these sprites bounce around the background increasing the difficulty. Again these are not controlled by the user and are therefore considered AI.

Page 19: Computer Science 1172 Scratch Project on Artificial Intelligence and Computational Thinking

Closing

• Thank you for your attention and have a great day.

• Any Questions?


Top Related