## Introduction:

With 30 different rides at Disneyland, your possibilities are seemingly endless for what your day could look like. Well, not exactly endless, but pretty close. 86,493,225 possibilities to be exact if you only get on 12 rides that day (30 choose 12). This leaves frequent Disneyland visitors, or individuals interested in data science, with an interesting question: What is the ideal day at Disneyland?

## How it works:

To attempt to answer this question, I applied a neural network to my MATLAB simulation from my previous article, Predicting Disneyland Wait Times through Population Simulations. That article goes into depth on how the simulation works, but essentially it follows different groups around Disneyland as they make ride choices and keeps a running score of their day. A higher score means they had a better day.

To apply a neural network to this data, I designed it to have just 1 layer, with an output and an input layer. The input layer consists of 60 nodes, with 30 being for the group’s ride history, and 30 being for the ride the group just rode. The output layer consisting of 30 nodes will be all of the possible next rides. The idea is that, given what you have already ridden, and what you just rode, the machine will pick your next ride.

To choose the training data, I want to look at the top 10% of scores from a simulated day at Disneyland. These groups obviously made decisions that resulted in a better day, so we want to train the neural network to make these same decisions. For each of these groups in the top 10%, I will take 5 samples from their ride order. In each of these samples, I will take the ride chosen as the correct output, and the ride before that along with the total ride history for the input. This will result in roughly 2,750 different sets of training data for the neural network (10% of around 5,500 groups, with 5 samples each). Below is an example of how each individual training data is collected from the simulation data matrix.

`training_data = zeros(num_groups * 5 * 0.1, 60); % initializes the training matrixcorrect_output = zeros(num_groups * 5 * 0.1, 30); % initializes the output matrixindex2 = 0; % initializes an indexindex3 = 0; % initializes an indexridebefore = 0; % establishes a variableoutput_ride = 0; % establishes a variablerides_before = []; % establishes an arraytop10 = prctile(group_data(:,43),90);for a2 = 1:num_groups % for...`