## Inspiration

With everything going on nowadays, people are starting to feel less connected. While we are focused on physical illnesses during these times, we tend to forget to take care of our mental health. Our team wanted to make a game that would show a bit about how hard it is to live with depression to give a chance for people to have fun while learn more about mental health. We wanted to start conversations about mental health and allow people to connect.

## What it does

The mobile game, ‘Hope’ portrays the life of a girl who is going through depression, difficulties are solved through mini-games, while her daily life is being portrayed through animations and comic strips.

## How we built it

We used Unity to create this game, and we used Procreate to create all of the assets.

## Challenges we ran into

Some members of our team were new to programming, and they learned a lot of new skills like C# programming and navigating Unity. Also, we had a lot of assets to draw in such a short amount of time.

## Accomplishments that we're proud of

We are proud that we made a complete game with great purpose in such a short time.

## What we learned

Through the development of this game/project, we learnt various new skills regarding the use of unity and C#.

## What's next for Hope

We hope to continue adding more mini-games to showcase more aspects of mental health and depression. We may create other versions of the game focusing on different aspects of mental health.

APK download link: <https://github.com/SallyLim/Hope/releases/download/v1.0/hope.apk>
## Inspiration

We noticed there were a ton of mental health websites and resources available to students, but they were marketed in a boring and patronizing way (or not at all). Also, there were so many websites and apps that it could get overwhelming for someone seeking help. Our game hoped to be an interface that gradually introduces new resources in a fun, accessible way. As for the style, we were inspired by retro pixel art games like shining gaiden 2 and Pokemon. The mechanics were inspired by gacha games (eg clash royale's box mechanic) where rewards are random, so people get hooked easily. The scenery is based on MY150 at Myhal at UofT.

## What it does

It's a pixel art mobile game where you collect points by grabbing items that are good for mental health (nature, doggos, and ironically sleep). Some of these doggos will activate buttons, with links that take you straight to a random mental health resource. We hoped to gamify mental health access so people aren't as intimidated when seeking help.

## How we built it

Unity and GIMP mostly

## Challenges we ran into

Endless errors, mostly because we're bad at Unity. The score counter wouldn't work because it was TextMeshPro but the tutorial used Text. Audio and particle effects from things exploding had to continue after destroying the object, so we delayed the destruction and just disabled the renderer (which is dumb but whatever). The colliders sometimes triggered effects multiple times per sprite, and finding the right velocity for spawned projectiles took forever. There were about 20 layers of sprites and sometimes nothing lined up correctly.

## Accomplishments that we're proud of

The game looks nice. Also it actually accomplishes the goal we set out to achieve, and is fun to play.

## What we learned

How to use most of Unity 2D. How to make UIs. What a jagged array is. C# in general.

## What's next for Myhal Mental Health Madness

More spawners, levels, and mental health links.
# Gait @ TreeHacks 2016

[![Join the chat at https://gitter.im/thepropterhoc/TreeHacks_2016](https://badges.gitter.im/thepropterhoc/TreeHacks_2016.svg)](https://gitter.im/thepropterhoc/TreeHacks_2016?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Diagnosing walking disorders with accelerometers and machine learning

**Based on the original work of Dr. Matt Smuck**

![Walking correctly](https://d30y9cdsu7xlg0.cloudfront.net/png/79275-200.png)

Author : *Shelby Vanhooser*

Mentor : *Dr. Matt Smuck*

---

### Goals

***Can we diagnose patient walking disorders?***

* Log data of walking behavior for a known distance through a smartphone
* Using nothing but an accelerometer on the smartphone, characterize walking behaviors as *good* or *bad* (classification)
* Collect enough meaningful data to distinguish between these two classes, and draw inferences about them

---

### Technologies

* Wireless headphone triggering of sampling
* Signal processing of collected data
* Internal database for storing collection
* Support Vector Machine (machine learning classification)

-> Over the course of the weekend, I was able to test the logging abilities of the app by taking my own phone outside, placing it in my pocket after selecting the desired sampling frequency and distance I would be walking (verified by Google Maps), and triggering its logging using my wireless headphones. This way, I made sure I was not influencing any data collected by having abnormal movements be recorded as I placed it in my pocket.

****Main screen of app I designed****
![Landing screen](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Screenshots/Screenshot_2.png)

****The logging in action****
![The logging app in action](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Screenshots/Screenshot_1.png)

-> This way, we can go into the field, collect data from walking, and log if this behavior is 'good' or 'bad' so we can tell the difference on new data!

---

### Data

First, let us observe the time-domain samples recorded from the accelerometer:

![Raw signal recorded](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Collected_Data/Time_Domain.png)

It is immediately possible to see where my steps were! Very nice. Let's look at what the spectrums are like after we take the FFT...

*Frequency Spectrums of good walking behavior*
![Good walking behavior frequency spectrum](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Collected_Data/images/good_animated.gif)

*Frequency spectrums of bad walking behavior*
![Bad walking behavior frequency spectrum](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Collected_Data/images/bad_animated.gif)

19 'correct' walking samples and 5 'incorrect' samples were collected around the grounds of Stanford across reasonably flat ground with no obstacle interference.

***Let's now take these spectrums and use them as features for a machine learning classification problem***

-> Additionally, I ran numerous simulations to see what kernel in SVM would give the best output prediction accuracy:

**How many features do we need to get good prediction ability?**

*Linear kernel*
![ROC-like characterization](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Collected_Data/Linear_SVM_2000_Sample_FFT.png)

**Look at that characterization for so few features!**

Moving right along...

*Quadratic kernel*
![ROC-like characterization](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Collected_Data/Quadratic_SVM_2000_Sample_FFT.png)

Not as good as linear. What about cubic?

*Cubic kernel*
![ROC-like characterization](https://raw.githubusercontent.com/thepropterhoc/TreeHacks_2016/master/Collected_Data/Cubic_SVM_2000_Sample_FFT.png)

Conclusion: We can get 100% cross-validated accuracy with...
***A linear kernel***

Good to know. We can therefore predict on incoming patient data if their gait is problematic!

---

### Results

* From analysis of the data, its structure seems to be well-defined at several key points in the spectrum. That is, after feature selection was run on the collected samples, 11 frequencies were identified as dominating its behavior:

**[0, 18, 53, 67, 1000, 1018, 1053, 2037, 2051, 2052, 2069]**

***Note*** : it is curious that index 0 has been selected here, implying that the overall angle of an accelerometer on the body while walking has influence over the observed 'correctness' of gait

* From these initial results it is clear we *can* characterize 'correctness' of walking behavior using a smartphone application!
* In the future, it would seem very reasonable to have a patient download an application such as this, and, using a set of known walking types from measurements taken in the field, be able to diagnose and report to an unknown patient if they have a disorder in gait.

---

### Acknowledgments

* **Special thanks to Dr. Matt Smuck for his original work and aid in pushing this project in the correct direction**
* **Special thanks to [Realm](https://realm.io) for their amazing database software**
* **Special thanks to [JP Simard](https://cocoapods.org/?q=volume%20button) for his amazing code to detect volume changes for triggering this application**
* **Special thanks to everyone who developed [Libsvm](https://www.csie.ntu.edu.tw/%7Ecjlin/libsvm/) and for writing it in C so I could compile it in iOS**