+ All Categories
Home > Documents > F uzzy L ogic I nference for P ong ( FLIP )

F uzzy L ogic I nference for P ong ( FLIP )

Date post: 07-Feb-2016
Category:
Upload: lilka
View: 38 times
Download: 0 times
Share this document with a friend
Description:
F uzzy L ogic I nference for P ong ( FLIP ). Brandon Cook & Sophia Mitchell Undergraduate Students, Department of Aerospace Engineering, Student Members AIAA Dr. Kelly Cohen Associate Professor, Department of Aerospace Engineering, Associate Fellow AIAA - PowerPoint PPT Presentation
Popular Tags:
44
Fuzzy Logic Inference for Pong (FLIP) Brandon Cook & Sophia Mitchell Undergraduate Students, Department of Aerospace Engineering, Student Members AIAA Dr. Kelly Cohen Associate Professor, Department of Aerospace Engineering, Associate Fellow AIAA Sponsored by: NSF Type 1 STEP Grant, Grant ID No.: DUE- 0756921 1
Transcript
Page 1: F uzzy  L ogic  I nference for  P ong ( FLIP )

1

Fuzzy Logic Inference for Pong (FLIP)

Brandon Cook & Sophia MitchellUndergraduate Students, Department of Aerospace Engineering,

Student Members AIAA

Dr. Kelly CohenAssociate Professor, Department of Aerospace Engineering, Associate Fellow AIAA

Sponsored by: NSF Type 1 STEP Grant, Grant ID No.: DUE-0756921

Page 2: F uzzy  L ogic  I nference for  P ong ( FLIP )

2

Outline

• Project Goal & Objectives• Project Research Tasks• Introduction to Fuzzy Logic• Results• Future Work

Page 3: F uzzy  L ogic  I nference for  P ong ( FLIP )

3

Project Goals• Test the effectiveness of a fuzzy logic based robot at

emulating human like reasoning in a competitive environment

• Grasp understanding of intelligent robotics while enhancing capabilities for real world applications.

[5]

Page 4: F uzzy  L ogic  I nference for  P ong ( FLIP )

4

Overall Objectives

• Create PONG simulation in MATLAB– Singles• Familiarize with gaming strategies• Cascading Fuzzy Logic

– Doubles• Collaborative robotics

[6]

Page 5: F uzzy  L ogic  I nference for  P ong ( FLIP )

5

Project Research Tasks

• Conduct literature survey • Develop rules for the

Fuzzy Inference System (FIS)• Create an “Intelligent Team” of two autonomous agents• Successfully implement rotation DOF (Degree of

Freedom) & enhanced bounce characteristics• Test the effectiveness of the FIS• Test the effectiveness of the “Intelligent Team”

[7]

Page 6: F uzzy  L ogic  I nference for  P ong ( FLIP )

6

Fuzzy Logic

• Allows classification of variables for more human-like reasoning

• Utilizes linguistic reasoning• Common terms• Inputs• Rules• Outputs• Membership Function• Fuzzy Inference System (FIS)

Page 7: F uzzy  L ogic  I nference for  P ong ( FLIP )

7

Fuzzy Inference System

[3]

Page 8: F uzzy  L ogic  I nference for  P ong ( FLIP )

8

Fuzzy Decision Making

Page 9: F uzzy  L ogic  I nference for  P ong ( FLIP )

9

Page 10: F uzzy  L ogic  I nference for  P ong ( FLIP )

10

Assumptions & Constraints

• Confined paddle movement and rotation speed

• Varying difficulty not available (e.g. easy, medium, hard)

• No physical system used– In real world scenario robotics would be equipped with

sensors to quantify ball speed, trajectory pattern, etc.– Must imitate how a human perceives the game with

eyesight• Supply qualitative data to Fuzzy paddle in real-time

Page 11: F uzzy  L ogic  I nference for  P ong ( FLIP )

11

Singles Configuration

Page 12: F uzzy  L ogic  I nference for  P ong ( FLIP )

12

Fuzzy Paddle

Page 13: F uzzy  L ogic  I nference for  P ong ( FLIP )

13

Cascading Fuzzy Logic• Output from one FIS becomes input for subsequent FIS

Score Difference

Ball Speed

Opponent Position

Opponent Inertia

Where to hit the ball:Top, Middle, Bottom

Game Type:Offensive, Defensive

My Position:Top, Middle, Bottom

Desired Paddle Angle to Score on Opponent

Page 14: F uzzy  L ogic  I nference for  P ong ( FLIP )

14

Open FISInertia

Position

Open

BE – Very Bottom, B – Bottom, M – Middle, T – Top, TE – Very TopGD – Going Down, S – Stationary, GU – Going UpVB – Very Bottom, B – Bottom, M – Middle, T – Top, VT – Very Top

15 Rules

Page 15: F uzzy  L ogic  I nference for  P ong ( FLIP )

15

Open: Rule Set1. If (Position is VB) and (Inertia is GD) then (Open is M)2. If (Position is VB) and (Inertia is S) then (Open is T)3. If (Position is VB) and (Inertia is GU) then (Open is TE)4. If (Position is B) and (Inertia is GD) then (Open is T)5. If (Position is B) and (Inertia is GS) then (Open is T)6. If (Position is B) and (Inertia is GU) then (Open is TE)7. If (Position is M) and (Inertia is GD) then (Open is TE)8. If (Position is M) and (Inertia is S) then (Open is TE)9. If (Position is M) and (Inertia is GU) then (Open is BE)10. If (Position is T) and (Inertia is GD) then (Open is BE)11. If (Position is T) and (Inertia is S) then (Open is BE)12. If (Position is T) and (Inertia is GU) then (Open is B)13. If (Position is VT) and (Inertia is GD) then (Open is BE)14. If (Position is VT) and (Inertia is S) then (Open is B)15. If (Position is VT) and (Inertia is GU) then (Open is M)

Page 16: F uzzy  L ogic  I nference for  P ong ( FLIP )

16

Game Type FISScore

Ball Speed

Game Type

6 Rules

Page 17: F uzzy  L ogic  I nference for  P ong ( FLIP )

17

Strategy FIS

Game

Strategy

Open

My Position

VB: Very Bottom, B: Bottom, C: Center, T: Top, VT: Very TopBE Very :Bottom, B: Bottom, M: Middle, T: Top, TE: Very Top

25 Rules

Page 18: F uzzy  L ogic  I nference for  P ong ( FLIP )

18

Movement FIS

Movement

Angle Rotate

Distance

Fbelow: Far Below, Cbelow: Close Below, OnT: On Target, Cabove: Close Above, Fabove: Far Above , FCW: Far Clockwise, NCW: Near Clockwise, OnT: On Target, NCCW: Near Counter Clockwise, FCCW: Far Counter Clockwise, Dfast: Down Fast, Dslow: Down Slow, None: No Movement, Uslow: Up Slow, Ufast: Up Fast, CWFast: Clockwise Fast, CWSlow: Clockwise Slow, None: No Rotation, CCWSlow: CounterClockwise Slow, CCW Fast: CounterClockwise Fast

25 Rules

Page 19: F uzzy  L ogic  I nference for  P ong ( FLIP )

19

Results

Page 20: F uzzy  L ogic  I nference for  P ong ( FLIP )

20

Simulation: Human vs. Robot

Page 21: F uzzy  L ogic  I nference for  P ong ( FLIP )

21

Results: Human vs. Robot

Conclusions:• Highly difficult to defeat the Fuzzy

controller• Rules are sufficient for defeating a human

player• Can use similar logic and methodology to

produce doubles game

Page 22: F uzzy  L ogic  I nference for  P ong ( FLIP )

22

Results: Robot vs. Robot

Conclusions:• Each “volley” lasted nearly 5 minutes• Fuzzy controllers are equally matched• Highly effective at calculating the ball

trajectory to find intersection point

Page 23: F uzzy  L ogic  I nference for  P ong ( FLIP )

23

Doubles Configuration

NOTE: FLIP 1 = Back Paddle, FLIP 2 = Front Paddle

Page 24: F uzzy  L ogic  I nference for  P ong ( FLIP )

24

Human Collaboration

• Inspired by 2010 Australian Open tennis matches: Federer and Mirka

• Player’s positioning showed their role in the game– Front: Offensive– Back: Defensive

• Cover as much of the court as possible by staggering• Front player used hand signals to notify partner play or

movement– To mimic this, the front paddle makes final decision

to who goes for the ball

Page 25: F uzzy  L ogic  I nference for  P ong ( FLIP )

25

Collaborative Reasoning

Page 26: F uzzy  L ogic  I nference for  P ong ( FLIP )

26

Collaborative Reasoning: Part 1

• FLIP 2 calculates POI (Point Of Intersection)• FLIP 2 recognizes its own court position• FLIP 1 sends FLIP 2 its court position and POI• FLIP 2 decides who

goes for the ball– Closest to POI

• FLIP 2 determinesgame type

Page 27: F uzzy  L ogic  I nference for  P ong ( FLIP )

27

Collaborative Reasoning: Part 2.1

• Option 1: FLIP 1 goes for the ball• FLIP 2 must avoid so doesn’t block the ball after

hit by FLIP 1• Recognizes FLIP 1

Angle & Position

Page 28: F uzzy  L ogic  I nference for  P ong ( FLIP )

28

Collaborative Reasoning: Part 2.2

• Option 2: FLIP 2 goes for the ball• Calculates both opponents Position and Inertia• Finds open section of the court• Finds own position,

rotation, open portion of court, and game type

• Moves and rotates to intercept ball

Page 29: F uzzy  L ogic  I nference for  P ong ( FLIP )

29

Collaborative Reasoning: Part 3

• FLIP 1:• Calculates its POI• Recognizes own position• Calculates how far it needs to translate to

intercept the ball

Page 30: F uzzy  L ogic  I nference for  P ong ( FLIP )

30

Collaborative Reasoning: Part 4.1

• Option 1: FLIP 1 goes for the ball– FLIP 1 uses same logic as previously described to

find optimal location and strategy to hit the ball

Page 31: F uzzy  L ogic  I nference for  P ong ( FLIP )

31

Collaborative Reasoning: Part 4.2

• Option 2: FLIP 2 goes for the ball– FLIP 2 tells FLIP 1 it needs to be backed up

(extremely defensive)• Move to normal POI

– FLIP 2 tells FLIP 1 it doesn’tneed backed up• Move to opposite side

of the court

Page 32: F uzzy  L ogic  I nference for  P ong ( FLIP )

32Open FIS

Inertia 2

Open

Inertia 1

Position 1

Position 1

GD: Going Down, S: Stationary, GU: Going UpVB: Very Bottom, B: Bottom, C: Center, T: Top, VT: Very TopBE Very :Bottom, B: Bottom, M: Middle, T: Top, TE: Very Top

225 Rules

Page 33: F uzzy  L ogic  I nference for  P ong ( FLIP )

33

Avoidance FISBack Paddle Angle

Back Paddle POI

Target Position

RD: Rotated Down (CW), OnT: On Target, RU: Rotated Up (CCW)FB: Very Bottom, B: Bottom, OnT: Center, A: Top, FA: Very TopBE Very :Bottom, B: Bottom, M: Middle, T: Top, TE: Very Top

20 Rules

Page 34: F uzzy  L ogic  I nference for  P ong ( FLIP )

34

Results

Page 35: F uzzy  L ogic  I nference for  P ong ( FLIP )

35

Simulation: Humans vs. Robots

Page 36: F uzzy  L ogic  I nference for  P ong ( FLIP )

36

Results: Humans vs. Robots

Methods:• Two veteran “gamers” selected to test the effectiveness of the

Fuzzy LogicConclusions:• Fuzzy team is superb at collaborating effectively to defeat the

opposing team• Highly effective at communicating in a time-critical manner• Excellent at making adjustments to the infinite gameplay

scenarios to defeat opponent

Page 37: F uzzy  L ogic  I nference for  P ong ( FLIP )

37

Simulation: Robots vs. Robots

Page 38: F uzzy  L ogic  I nference for  P ong ( FLIP )

38

Results: Robots vs. Robots

Methods:• Ran simulation for 30 servesConclusions:• Each “volley” lasted nearly 3 minutes• Intelligent teams are equally matched• Highly effective at calculating the ball trajectory to find

intersection point• Very challenging to score a point on the fuzzy team

Page 39: F uzzy  L ogic  I nference for  P ong ( FLIP )

39

Accomplishments• Rotational DOF added to human and Fuzzy paddles• Enhanced bounce characteristic– No longer a “convex paddle”– Angle of Incidence: allows for more intuitive ball control

• Ability to rotate and translate simultaneously– Less delay between commands and response– Allows Fuzzy paddle to rotate fully to desired output

• New Fuzzy Rules

Page 40: F uzzy  L ogic  I nference for  P ong ( FLIP )

Conclusions

• Fuzzy logic is an effective tool for collaboration between autonomous agents in a time-critical spatio-temporal environment

• A completely autonomous, robotic, intelligent team (or swarm) would be very useful in applications including:– Space robotics– Celestial body exploration and colonization– Unmanned Aerial Vehicles (UAVs)– Homeland security– Disaster relief programs

40

[8]

Page 41: F uzzy  L ogic  I nference for  P ong ( FLIP )

41

Future Work• Include game difficulty– Easy, Medium, Hard

• Modify FLIP’s FIS for extreme offensive moves capability– Passing from back to front paddle– Speeding up ball between paddles– Both go for ball with different paddle angles

• Use knowledge gained from research to create a real-life intelligent swarm of robotics

• Incorporate Type II Fuzzy Logic for learning capabilities

Page 42: F uzzy  L ogic  I nference for  P ong ( FLIP )

43

Acknowledgements

UC Academic Year – Research Experience for Undergraduates (AY-REU) Program

Sophia Mitchell (Base Pong Script)

Dr. Kelly Cohen

Page 43: F uzzy  L ogic  I nference for  P ong ( FLIP )

References1. Kosko, Bart. Fuzzy Thinking: The New Science of Fuzzy Logic. New York: Hyperion, 1993. Print.2. Mendel, Jerry M., and Dongrui Wu. "Interval Type-2 Fuzzy Sets." Perceptual Computing: Aiding People in Making Subjective Judgments. Piscataway, NJ: IEEE, 2010. 35-64. Print.3. Sabo, C., Kingston, D., Cohen, K., “SMART Heuristic for Pickup and Delivery Problem (PDP) with Cooperative UAVs”, AIAA Infotech@Aerospace Conference, St. Louis, MO, March 29-31, 2011, AIAA Paper 2011-14644. http://gamerfront.net/2012/02/atari-announces-the-100000-pong-indie-developer-challenge/172355. http://en.wikipedia.org/wiki/File:NASA_Curiosity_Rover.jpg6. http://gamerfront.net/2012/02/atari-announces-the-100000-pong-indie-developer-challenge/172357. http://gamerfront.net/2012/02/atari-announces-the-100000-pong-indie-developer-challenge/172358. http://www.lynnehartke.com/2012/10/what-to-say-to-someone-with-chronic.html#!/2012/10/what-to-say-to-someone-with- chronic.html9. http://orbitertutorials.zxq.net/astronaut_qualifications.htm

Page 44: F uzzy  L ogic  I nference for  P ong ( FLIP )

45

Questions?


Recommended