My HLD on Fashionista Phil

advertisement
Fashionista Phil: Trending Now High Level Design (HLD) Document
1. Introduction
Fashionista Phil is devoted to the world of non-hipster fashion and wants to understand
color trends within the fashion world. He has hired you and your programmer to build a model
that will simulate (not predict) color trends for a ten-year period or longer. He wants to see a
nice graph that representing each color’s rise or fall. Phil also wants to be able to stop the model
at anytime and be able to see a color trending.
The Problem
Create a world of ‘x’ number of people who at the start of the model will be assigned a
random color and a random percentage to resist change. Each person will move around the
world randomly. When two people meet they will assess each other.
When two people meet one of three things will happen.
1. Person 1 adopts Person 2’s color.
2. Person 2 adopts Person 1’s color.
3. Nothing
Keep in mind as more and more people wear color ‘y’, the color will start trending (becoming
popular). As the popularity of color ‘y’ trends upward, the more influence the color has when two
people meet. At some point the trend will become too popular and people will start look for a
new color. The hipsters will not want to become the popular color and they are less likely to
change their color because of another person or influence their own color.
2. Subject Matter Experts Agreement List
Name
Title/Role
Mandatory
Reviewer (Y/N)
Herjot Cheema
Developer
Y
Phil List
Supervisor
Y
Amalan Iyengar
Intern-apprentice
wrangler
Y
Mentor
Mentor
Y
Approved
3. Requirements
Look at the story in the introduction and read the requirements.
You want to be able to record and graph trending colors and you must
record over a ten-year period. A counter can do this by recording the number of
people that are a certain color and record them in a nice, visual graph. The
variables you are looking for are the normal people, who like popular colors, and
the hipsters, who do not like the popular color, are less likely to influence a color,
and they are less likely to conform to liking the popular color. One person cannot
like two colors at the same time. You can randomly assign colors to people and
hipsters but there must be a total population of 100 people in the world that you
are documenting. When the people “meet”, they must be one space apart (to the
left, right, above, or below) in order to exchange colors. There must be a
percentage of changing their color to a neighbor’s color. This percentage could
be 60% or around 60%. All colors should have an equal chance of influence and
there should be 3-4 colors in total. The meeting of the two or more people should
last a certain amount of time steps in order for the exchange in colors to occur.
The length of the time step is up to you.
a. A [Javascript/Agentsheets] model showing the interactions of agents which
exhibit the following behaviors:
i. Person (RandomColor)
1. If Person 1 stands next to Person 2, have the chance to exchange
colors
ii. Hipster (UncommonColor)
1. Stands next to another person
2. Has less of a chance of changing colors.
iii. Counter (Image of counter)
1. If one person turns the color red, from the color yellow, subtract
one from total yellow people and add one to total red people.
4. Timeline
This is due within five days of receipt of the task (that would be Friday, June 20 for
those receiving this Monday, June 16). It is better to complete this sooner, so that
you can begin implementing an HLD that one of your classmates has written.
5. Desired Behavior / Components
Person
a. Get assigned a color.
b. Walk around randomly.
c. Bump into a person.
d. Stop and stand next to another person.
e. Stand next to the person for a set amount of time.
f. Have the chance of influencing or accepting a color.
g. Walk away.
h. Continue to accept other popular colors.
i. Accept a new color when their color is too popular.
Hipster
a. Get assigned a color.
b. Walk around randomly.
c. Bump into a person.
d. Stop and stand next to that person.
e. Stand next to that person for a set amount of time.
f. Have a less chance of influencing a color and a less chance of accepting a
color from/to another person.
g. Walk away.
h. Change to a different color when their color becomes popular.
Counter
a.
b.
c.
d.
e.
Count the starting amount of each color.
Add one to the color that gains one person.
Subtract one from the color that loses a person.
Graph the results during the ten-year period
Have the graph update every year.
Replace the words in bold with your own words. Add more steps if you need them.
Do this for each behavior of each agent.
6. Conclusion
The goal is this activity is to figure out how long a color will be popular in a set
amount of people. This can be useful to a fashion designer so he/she can monitor
how long a style is popular. You need to be able to create a graph of the rise and fall
of each color for Phil to see. Remember you need to document color trends for a tenyear period and you should be able to stop the program at any time during the ten
years.
Download