DOC PREVIEW
UW-Madison ECE 539 - Cat Hunt Expanded Dog Chasing Cat Problem

This preview shows page 1-2-19-20 out of 20 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 20 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Eric Olson Cat Hunt ECE 539 Semester Project 1 Cat Hunt Expanded Dog Chasing Cat Problem Eric Olson ECE 539 Professor Hu December 19, 2003Eric Olson Cat Hunt ECE 539 Semester Project 2 TABLE OF CONTENTS INTRODUCTION......................................................................................................................... 3 MOTIVATION ................................................................................................................. 3 PROBLEMS ...................................................................................................................... 3 WORK PERFORMED................................................................................................................. 3 PROGRAMMING ............................................................................................................ 3 TESTING........................................................................................................................... 5 RESULTS ...................................................................................................................................... 5 CONCLUSION ............................................................................................................................. 5 APPENDIX A: Matlab Source Code, Chase Script................................................................... 6 APPENDIX B: Matlab Source Code, Closest Dog Calculator ............................................... 13 APPENDIX C: Matlab Source Code, Distance Formula........................................................ 14 APPENDIX D: Matlab Source Code, Graphical Analysis...................................................... 15 APPENDIX E: Required Files................................................................................................... 16 APPENDIX F: Sample Graphical Representations................................................................. 17 APPENDIX G: Testing Results, Max-Min ............................................................................... 18 APPENDIX H: Testing Results, Kosko’s Max-Product.......................................................... 19 APPENDIX I: Graphical Analysis, Max-Min vs. Kosko’s Max-Product Rule..................... 20Eric Olson Cat Hunt ECE 539 Semester Project 3 INTRODUCTION The following is the final report for the semester project in ECE 539: Introduction to Artificial Neural Network and Fuzzy Systems. This project creates a modified and expanded version of the dog-cat simulation. The simulation uses Fuzzy Control Logic to determine paths taken by the dogs chasing the cat. In this expanded version, there are options for multiple dogs and the cat has been given some limited artificial intelligence to attempt to evade the dogs. Motivation • It was relatively boring to watch the cat run straight and have the dog circling it. • Cats are smart, let it try to escape. • Dogs are smarter than the original simulation. • Dogs really don’t like cats, get more dogs! Problems 1. Expand and improve the dog-cat problem by increasing the number of dogs and improving their A.I., while also giving the cat A.I. 2. Create clearer and easier to use graphical representation of chase simulation WORK PERFORMED Programming The simulation is based on the dog-cat problem and the script dogcatfz.m written by Yu Hen Hu. The program was built around the fuzzy systems and rules created by Hu in his simulation. From his original program, many new features were added including: 1. Control interface menu to get parameters from user a. Dog locations created randomly from input number from user b. Dog locations determined from data file “test” 2. Two graphical representation possibilities (Appendix F) a. Animal route plotting with trails b. Animal route plotting without trails 3. Code to allow for many iterations to test results 4. Artificially intelligent cat that attempts to evade and escape dogsEric Olson Cat Hunt ECE 539 Semester Project 4 5. Support for unlimited number of dogs 6. Improved dog chasing A.I. Structure The program is run by the main script chase.m (Appendix A). This file runs the simulation. It has a main loop that continues calculating and plotting routes of the cat and the dogs until the cat is caught, escapes the 600x600 square, or iterates 500 times. The makes calls to all required files shown in Appendix E. New scripts closest.m (Appendix B) and distance.m (Appendix C) were written to complete important calculations for the main script program. Theory Cat A.I. The cat A.I. was developed initially using FCL, but it did not fit the needs of the simulation. Instead, through testing, it was determined and developed that the cat would base it’s future route off of the biggest threat: the closest dog. After determining which dog was closest, the cat would then run in the same direction that the dog is running in. This is not always directly away from the dog if that dog is “far” away from the cat as discussed in the Dog A.I. section below. I felt that this design would allow for a more appropriate decision making process by the cat. Dog A.I. The dog A.I is mainly handled using FCL that was implemented originally by Professor Hu in his dogcatfz.m simulation. This FCL system was built upon to improve the dogs’ capability at catching the cat. Initially, the dog would merely run towards where the cat is at the time of calculation. Because of this, dogs that were “far” away from the cat would have little to no chance of catching the cat. The modified method checks if the dog is close to the cat (within 5 iterations of reaching the cat’s current position). If close, the dog uses FCL to determine its route. If far from the cat, the dog sets its course for a point in front of the cat as guessed upon using the cat’s current position and angle it is facing. If the dog is far from the cat and the cat is moving relatively towards the dog, the route is determined using FCL. This model allows for the dogs close to the cat to swarm while the dogs far from the cat to attempt to head the cat off in its attempt to escape. Method of Inference The infer.m script allows us to choose either the Max-Min rule or Kosko’s Max-Product rule for calculations. Based on results compiled for the Final Exam, it was hypothesized that the Max-Min rule would create a more successful FCL. The results of testing these


View Full Document

UW-Madison ECE 539 - Cat Hunt Expanded Dog Chasing Cat Problem

Documents in this Course
Load more
Download Cat Hunt Expanded Dog Chasing Cat Problem
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Cat Hunt Expanded Dog Chasing Cat Problem and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Cat Hunt Expanded Dog Chasing Cat Problem 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?