Skip to content

Commit 08bb6d5

Browse files
created fundamental structure of matching game
1 parent 9eac9d8 commit 08bb6d5

File tree

3 files changed

+73
-1
lines changed

3 files changed

+73
-1
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
button {
2+
background-color: skyblue;
3+
border-radius: 5px;
4+
padding: 10px;
5+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import React from "react";
2+
import { useState } from "react";
3+
import "./MatchingGame.css";
4+
import placeholderThumbnail from "../placeholderThumbnail.png";
5+
6+
export const MatchingGame = () => {
7+
const [score, setScore] = useState(0);
8+
9+
function processGroup1Click() {
10+
setScore(score + 10);
11+
}
12+
13+
function processGroup2Click() {
14+
setScore(score - 5);
15+
console.log(score);
16+
}
17+
18+
return (
19+
<>
20+
<br></br>
21+
<h1>Let's play a game!</h1>
22+
23+
<p>Score: {score}</p>
24+
25+
<img src={placeholderThumbnail} width={250} height={250} alt="game"></img>
26+
<br></br>
27+
<button onClick={processGroup1Click}>Group 1</button>
28+
29+
<button onClick={processGroup2Click}>Group 2</button>
30+
31+
<br></br>
32+
</>
33+
);
34+
};

website/src/assets/College/collegeLabContent.js

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import React from "react";
33
import "../../main.css";
44
import EssayContainer from "../../components/posts/CollegeAdmissions/essay/EssayContainer";
55
import WomenEnrollmentContainer from "../../components/posts/CollegeAdmissions/enrollmentGraph/WomenEnrollmentContainer.js";
6+
import { MatchingGame } from "./MatchingGame.js";
67

78
export default [
89
{
@@ -140,7 +141,39 @@ export default [
140141
],
141142
},
142143
},
143-
144+
{
145+
post: {
146+
profilePic: teachLogo,
147+
profilePicName: "Profile Picture - Thinking Like an ML Model",
148+
header: "Thinking Like an ML Model",
149+
headerLink: true,
150+
linkTo: "facebook",
151+
subheader:
152+
"Why did the model take factors unrelated to competence into account?",
153+
bodyText: [
154+
{
155+
body: (
156+
<p className="bold">
157+
The computer isn't really looking for gender. So why does it learn
158+
to take that into account without being told to do so?
159+
<br></br>
160+
<br></br>
161+
Here's an interactive example that emulates how machine learning
162+
models "learn".
163+
<br></br>
164+
<br></br>
165+
Grouping exercise!
166+
<br></br>
167+
Explain why you make mistakes.
168+
<br></br>
169+
Explain how that's similar to how ML models make mistakes.
170+
<MatchingGame />
171+
</p>
172+
),
173+
},
174+
],
175+
},
176+
},
144177
{
145178
post: {
146179
profilePic: teachLogo,

0 commit comments

Comments
 (0)