Luokat: Kaikki - consensus - input - problem - brainstorm

jonka Gary Sibbitts 10 vuotta sitten

376

5) 601 - Rock, Paper, Scissors (v2)

Thorough research and clear problem descriptions are essential for effective problem-solving, as incomplete research or poor descriptions can fail to address root causes. A Smart Map can assist in researching and describing problems from multiple angles, combining factual information-gathering tools and lateral thinking techniques to develop comprehensive perspectives.

5) 601 - Rock, Paper, Scissors (v2)

Where next?

You can continue to develop this map without the Smart Map wizard by saving it as a normal Mindomo map.

When have a comprehensive description of the problem, you can move towards finding solutions. Consider a brainstorm as a next step, using the Brainstorming Toolbox Smart Map.

You can delete this topic from the saved map.

Welcome

Researching and describing a problem clearly is the foundation for solving it. Solutions based on incomplete research or poor descriptions can often fail to reach the root causes.

This Smart Map helps you to research and describe a problem from a number of different angles. It contains a mix of factual information-gathering tools and lateral thinking techniques, to develop perspectives that can point towards solutions.

You can use this map individually and in collaboration with others. It is vital to get consensus on the actual problem you are facing, otherwise there may be no consensus on the solution. Putting the descriptions together in one place helps you to explain and agree upon the basis for finding and evaluating solutions.

You can delete this topic from the saved map.

Get valid input from user


set validInput = false
do
display prompt for input
read input
if input is 1, 2 or 3 then
set validInput = true
else
set validInput = false
display an error message
end if
while validInput == false // input is not valid
set userChoice = "converted" input value
return userChoice

// false economy
do
display prompt for input
read input
while input is not 1, 2 or 3


is input valid

Read input

Display prompt for input

proceed to determine winner

display error message

Hey, take a look at the comment bubble

5) 601 - Rock, Paper, Scissors (v2)

GIST(General Idea of Some Thing): Write a console-based program that will allow a user to play Rock-Paper-Scissors against the computer.

Abstract: The console-based program will (describe what happens, paint a word-picture)

Be the problem

Be the problem is a popular technique for understanding problems. It means developing a character for the problem and describing its nature as if it were a person.

Insight

Analogies

Can you find analogies for this problem?
The underlying characteristics of a problem can sometimes be clearer when it is taken out of context.

What is it like?

Six serving men

"Six Serving Men" is based on Rudyard Kipling's poem, which begins:

''I keep six honest serving men
(They taught me all I knew);
Their names are What and Why and When
And How and Where and Who.''


We can profile a problem and perhaps discover more about it by asking structured questions.

Who?
Who not?
Where?
Where not?
How?
How not?
When?
When not?
Why?
Why not?
What?
What not?

Impact analysis

Impact analysis looks at who is affected by the problem - what the consequences are, rather than the causes.

Person
Impact

Root cause analysis

For analytical problems, root cause analysis can help to unravel indirect causes of problems, leading to more effective solutions. One way to do this is to keep asking "Why?" down to five levels, to understand the reasons behind the reasons.

Cause

Solution criteria

How will you know when you have solved the problem?
* What will a successful solution look like?
* How will you filter and assess potential solutions?
* How will you verify that the issue has been solved?
You might want to return to the solution criteria several times as you develop the definition of the problem.

internally, both the computer choice and user choice will use the same data type

This doesn't mean that the user has to enter 1, 2 or 3, only that the program is going to represent the user's choice as an integer with a value of 1, 2 or 3

validate user selection

user may enter either r, p or s, or 1, 2 or 3 to choose rock, paper or scissors

internally, use ROCK, PAPER or SCISSORS to represent the user's choice

NOTE: this is where you will use a while loop

use constants for choices and outcomes

const int ROCK = 0; // 0 - rock
const int PAPER = 1; // 1 - paper
const int SCISSORS = 2; // 2 - scissors
// possible outcomes/results
const int WIN = 1;
const int LOSE = -1;
const int TIE = 0;


if/else if/else, or while (looping) logic only
write no functions
Console-based program

game will continue, using a while loop, until there is a winner

Input:
Get valid input from user

Processing:
Get computer's choice and determine the winner (Nothing is displayed until after all processing has been completed.)

Output:
The computer's choice will be displayed after the outcome is determined.

The outcome of the turn will display after the computer's choice has been displayed.

What assumptions are you making?

In identifying the problem and the probability of a solution, what assumptions are you making?

Assumptions can sometimes be hard to see or accept. For example, if the "problem" is that sales
of a certain product are too low, you may naturally aim to increase sales. You are ''assuming''
that the market demand for this product will continue. But if the demand disappeared overnight in
a storm of negative publicity, then the original problem and solution also change. So the problem
and logical solution are partly based on an assumption.

computer will generate a random number 0, 1, or 2/ ROCK, PAPER or SCISSORS


user wants to play until there is a winner

game can end when either the computer or the user/player wins


Note to self: next version will display a menu where the user can select an option to display help, another option to play a single game or another option to play a best of

Also, provide option to stop the "madness"

user knows how to play RPS

What don't you know?

What other information might help, but is not available today?
* How would it help?
* How could you obtain it?
* Can you work without it?
* What are the risks or consequences of not knowing?
* Who else might have further information and insight?

Subtopic
randomize computer choice

add a random method?

Random rnd = new Random();
int computerChoice = rnd.Next(1, 4); // creates a number between 1) rock and 3) scissors

What do you know?

Factual data about the problem

Use case(s)

Narrative of the interaction between the program and the user.

As you develop the narrative, be careful with the nouns and verbs
that you use.

Verbs represent action-function
Nouns represent the things and are converted to variables

Primary

Here's where you can put your recipe for your Humanoid Analog Computer(HACr).

1) Welcome ...
2) Input from the user/player
3) Process the input
4) Computer generates its choice
5) Program identifies a winner
6) THE END...

5) THE END ...

4) Output results

2) Display win, lose or draw

1) Display computer's choice

3) Process: the input

2) Indentify winner

1) Computer generates its choice

2) Input: choice from the user/player

description:
rock-1, paper-2, scissors-3
Please enter one of these number values.
1) rock
2) paper
3) scissors

2) "Read" user/player input

1) Prompt user for input

1) Welcome ...

2) Display instructions

1) Display title of program

nouns
unknouns

Output:

Process:

game result

computer's choice

Input:

user's choice

knouns

knouns as data translate to ?________? in code

rules

paper beats rock

scissors beats paper

rock beats scissors

game results

draw

lose

win

choices

3) scissors

2) paper

1) rock

Problem type

What tools or patterns apply?

What is the best way to visualize or represent the inputs and outputs for the program?

Expression or series of expressions(simple algorithm)
Timeline?
Collection?

Think about the different types of math word problems you "know" how to solve.