Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -50,6 +50,43 @@ st.markdown('''
|
|
| 50 |
font-weight: 500;
|
| 51 |
}
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
/* Main Title */
|
| 54 |
h1 {
|
| 55 |
font-family: 'Orbitron', sans-serif !important;
|
|
@@ -443,6 +480,18 @@ LEARNING_INSIGHTS = [
|
|
| 443 |
"๐ Exponential Growth: Why depth 8 takes 10x longer than depth 5",
|
| 444 |
]
|
| 445 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 446 |
# Initialize Session State
|
| 447 |
if 'game' not in st.session_state:
|
| 448 |
st.session_state.game = ConnectFour()
|
|
@@ -558,6 +607,14 @@ if st.session_state.game_mode == "Two Player":
|
|
| 558 |
st.sidebar.markdown(f'<div class="metric-container"><strong>Player 1 (๐ด):</strong> {len(st.session_state.player1_analyses)} moves</div>', unsafe_allow_html=True)
|
| 559 |
st.sidebar.markdown(f'<div class="metric-container"><strong>Player 2 (๐ก):</strong> {len(st.session_state.player2_analyses)} moves</div>', unsafe_allow_html=True)
|
| 560 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 561 |
# Move History
|
| 562 |
if st.session_state.move_history:
|
| 563 |
with st.sidebar.expander("๐ MOVE HISTORY"):
|
|
@@ -918,4 +975,4 @@ if st.session_state.game_over and st.session_state.move_history_detailed:
|
|
| 918 |
file_name=f"connect_four_match_report_{timestamp}.txt",
|
| 919 |
mime="text/plain",
|
| 920 |
use_container_width=True
|
| 921 |
-
)
|
|
|
|
| 50 |
font-weight: 500;
|
| 51 |
}
|
| 52 |
|
| 53 |
+
/* Syllabus Coverage Container */
|
| 54 |
+
.syllabus-container {
|
| 55 |
+
background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(102, 126, 234, 0.1));
|
| 56 |
+
border-radius: 12px;
|
| 57 |
+
padding: 1rem;
|
| 58 |
+
margin: 1rem 0;
|
| 59 |
+
border-left: 4px solid #00D4FF;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.syllabus-title {
|
| 63 |
+
color: #00D4FF !important;
|
| 64 |
+
font-weight: 700 !important;
|
| 65 |
+
font-size: 0.95rem !important;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.syllabus-item {
|
| 69 |
+
background: rgba(0, 212, 255, 0.15);
|
| 70 |
+
border-left: 3px solid #00FF88;
|
| 71 |
+
padding: 0.6rem 0.7rem;
|
| 72 |
+
margin: 0.6rem 0;
|
| 73 |
+
border-radius: 6px;
|
| 74 |
+
color: #00FF88 !important;
|
| 75 |
+
font-size: 0.8rem !important;
|
| 76 |
+
line-height: 1.4 !important;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
.syllabus-topic-name {
|
| 80 |
+
font-weight: 700 !important;
|
| 81 |
+
color: #00FF88 !important;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
.syllabus-topic-usage {
|
| 85 |
+
color: #E0E0E0 !important;
|
| 86 |
+
font-size: 0.75rem !important;
|
| 87 |
+
margin-top: 0.2rem;
|
| 88 |
+
}
|
| 89 |
+
|
| 90 |
/* Main Title */
|
| 91 |
h1 {
|
| 92 |
font-family: 'Orbitron', sans-serif !important;
|
|
|
|
| 480 |
"๐ Exponential Growth: Why depth 8 takes 10x longer than depth 5",
|
| 481 |
]
|
| 482 |
|
| 483 |
+
# Syllabus Topics Covered with Descriptions
|
| 484 |
+
SYLLABUS_TOPICS = [
|
| 485 |
+
("Introduction to AI", "Foundation of intelligent game-playing agents"),
|
| 486 |
+
("Problem Solving as State Space Search", "Game board states as search space nodes"),
|
| 487 |
+
("Uninformed Search", "Exhaustive exploration of game tree depths"),
|
| 488 |
+
("Heuristic Search", "Evaluation function ranks promising moves"),
|
| 489 |
+
("Informed Search", "Alpha-beta pruning guides intelligent exploration"),
|
| 490 |
+
("Searching AND/OR Graphs", "Min-max alternation in game tree traversal"),
|
| 491 |
+
("Game Playing", "Core minimax algorithm with depth-limited search"),
|
| 492 |
+
("Minimax + Alpha-Beta", "Pruning optimization reduces computation by 70%"),
|
| 493 |
+
]
|
| 494 |
+
|
| 495 |
# Initialize Session State
|
| 496 |
if 'game' not in st.session_state:
|
| 497 |
st.session_state.game = ConnectFour()
|
|
|
|
| 607 |
st.sidebar.markdown(f'<div class="metric-container"><strong>Player 1 (๐ด):</strong> {len(st.session_state.player1_analyses)} moves</div>', unsafe_allow_html=True)
|
| 608 |
st.sidebar.markdown(f'<div class="metric-container"><strong>Player 2 (๐ก):</strong> {len(st.session_state.player2_analyses)} moves</div>', unsafe_allow_html=True)
|
| 609 |
|
| 610 |
+
# Syllabus Coverage Section with Expander - CLEAN VERSION
|
| 611 |
+
st.sidebar.markdown("---")
|
| 612 |
+
with st.sidebar.expander("๐ SYLLABUS COVERAGE (8 Topics)"):
|
| 613 |
+
st.markdown('<div class="syllabus-container"><div class="syllabus-title">Topics Covered in This Project</div></div>', unsafe_allow_html=True)
|
| 614 |
+
|
| 615 |
+
for topic_name, topic_usage in SYLLABUS_TOPICS:
|
| 616 |
+
st.markdown(f'<div class="syllabus-item"><span class="syllabus-topic-name">โ
{topic_name}</span><div class="syllabus-topic-usage">{topic_usage}</div></div>', unsafe_allow_html=True)
|
| 617 |
+
|
| 618 |
# Move History
|
| 619 |
if st.session_state.move_history:
|
| 620 |
with st.sidebar.expander("๐ MOVE HISTORY"):
|
|
|
|
| 975 |
file_name=f"connect_four_match_report_{timestamp}.txt",
|
| 976 |
mime="text/plain",
|
| 977 |
use_container_width=True
|
| 978 |
+
)
|