This document summarizes a student presentation about CodeGame, a game-based learning platform for programming. The presentation introduces CodeGame, describes its architecture and workflow, demonstrates some features, and discusses future work. CodeGame aims to enhance programming learning motivation through games and competitions. It supports basic machine learning environments and reports user resource usage. The demonstration shows features like account registration, local testing, model training, and game combat on leaderboards. Compared to other platforms, CodeGame adds competitive leaderboards, logs downloads, and a machine learning training environment. Future work may include multi-language support, tutorials, and utilizing more system resources.
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CodeGame
1. SCREAM Lab Presentation
Student: Yu-Han Cheng (程鈺涵)
Adviser: Prof. Alvin W. Y. Su (蘇文鈺 教授)
Date: 2019/06/25
CodeGame : 基於遊戲對戰之程式設計學習平台
CodeGame : A Game-Based Learning
Platform for Programming
Department of Computer Science and Information Engineering,
National Cheng Kung University, Tainan, Taiwan, R.O.C.
2. SCREAM Lab Presentation
• Introduction
• Implement of CodeGame
• Demonstrations
• Conclusion and Future Work
Outline
2
3. SCREAM Lab Presentation
• Introduction
– Motivation
– The relative platform nowadays
– Goal
• Implement of CodeGame
• Demonstrations
• Conclusion and Future Work
Outline
3
4. SCREAM Lab Presentation
Motivation
4
• Programming has become important at the moment.
– Enhance learning motivation for programming
– Provide users resource usage to improve the performance
– Guide beginners to learn basic concepts of AI
6. SCREAM Lab Presentation
6
Difference between The Relative Platform Nowadays
OpenAI Gym Kaggle Codecademy CodinGame
1 Game-based
2 Leaderboard
3
Display the
process of code
4
Open source (
user code)
5 ML Environment
6 Save user code
7. SCREAM Lab Presentation
Goal
7
• Implement an attractive learning platform for programming
– Hold combat game and competitive leaderboard
– Support basic ML environment in server system
– Report resource usage of each user process
8. SCREAM Lab Presentation
• Introduction
• Implement of CodeGame
– CodeGame Architecture
– Work Flow Overview
– Local Test Server
• Demonstrations
• Conclusion and Future Work
Outline
8
9. SCREAM Lab Presentation
Local Test
Server
Web
Server Game Server
Code
scheduler
Game
exec
Sub Server
Sub Server
User
Code
Game
Test
1
2 3
CodeGame Architecture
9
10. SCREAM Lab Presentation
Sub Server
Sub Server
Local Test
Server
User
Code
Game
Test
Web
Server
Game Server
Code
scheduler
Game
exec
Game
exec
Recv
User Code
Recv
User Code
Sub Server
Sub Server
Game
main
10
Pingpong
C
Python
game.py
lib.py + Lib
Work Flow Overview
+ Lib
game_id+
language_id
+
game_id+
language_id
+
game_id+
language_id
+
game_id+
language_id
+
CodeGame
ML
11. SCREAM Lab Presentation
1. Get game list from web server when loading page
2. Select a game
3. Get language list
4. Get library and the code of game
5. Choose the ML model file(.sav) when using ML code
Local test server
Interface operation
11
1.2 3.4
5
14. SCREAM Lab Presentation
– The game will be executed for up to 1000 frames for each test.
Local test server
Test game work
14
15. SCREAM Lab Presentation
• Introduction
• Implement of CodeGame
• Demonstrations
• Conclusion and Future Work
Outline
15
16. SCREAM Lab Presentation
Demonstrations
16
New account
– Register
– Email validation
– Login
Upload from local
– Write a code
– Test
– Upload
Train ML model
– Download log
– Tranform log data
– Train a model
Game combat
– Add room
– Enter room
– Select code
– Play
– Replay
Room1 Room2
P1 Erin NN Apple RFC
P2 Official — Erin RFC
log.txt
data_Transform.py
train_NN_RFC.py
GameInfor_test.pickle
RFC_model.sav NN_model.sav
17. SCREAM Lab Presentation
• Introduction
• Implement of CodeGame
• Demonstrations
• Conclusion and Future Work
Outline
17
18. SCREAM Lab Presentation
18
Conclusion
Compare with The Relative Platform Nowadays
OpenAI Gym Kaggle Codecademy CodinGame CodeGame
Game-based
Competitive
leaderboard
Display the
progress of code
Open source (
user code)
ML environment
Save user code
Download log
Chat box
scikit-learn library
After competition period
with message
19. SCREAM Lab Presentation
19
OpenAI Gym Kaggle Codecademy CodinGame
Discussion
Multiple
Language
Tutorial course
Social links
Online Compile
ML
Training Enviro
nment
Notifications
Future Work
CPU GPU
CPU cores 4 2
GB of RAM 17 14
現有平台的幾個特點有:
Game-based 增加使用者學習的動力
Competition 製造良性競爭的環境 讓使用者持續優化程式碼追求卓越
Real-time 介面上的畫面呈現 是realtime的由後端server執行的使用者程式碼傳遞驅動到client 而來 OPENAI因為在本機端 沒有server和client的概念 畫面本來就是即時顯示 所以不完全算real time
CodinGame 會將每個frame的結果顯示出來,且可以即時暫停重播等
Open source 公開使用者的程式碼為開源碼 kaggle是可以自行選擇是否公開城市碼,我們的平台是計畫賽期結束後再重播畫面可以看到雙方的程式碼(目前遊戲沒有賽期)( user code)
ML Environment ,openAI GYM環境和 kaggle的平台可以支援機器學習的訓練和測試而我們平台目前是提供python 的 scikit-learn 套件的應用 使用者須在自己的電腦上訓練好模型後上傳至平台 做inference 預測
Save user code 在kaggle上有案提交程式碼他就會紀錄,而我們的平台也是會記錄每份使用者上傳的程式碼,在local端編寫程式碼提交前可以編輯提交訊息 來讓使用者區別不同版本的程式碼 這個提交訊息可以在平台遊戲對戰前選擇程式碼的時候看到
所以我們的目標為 實作一個吸引人學習程式設計的平台 來實現我們的動機
平台主要的特點會有:
對戰遊戲 和排行榜競爭 予以使用者持續學習的動力
回報執行該份程式碼使用多少CPU和記憶體資源,讓使用者了解效能進而優化程式碼
最後
在我們的平台系統中 支援基本的機器學習環境
----------------------------------
Game https://www.boomerangtv.co.uk/games
Cpu http://udayarumilli.com/monitor-cpu-utilization-io-usage-and-memory-usage-in-sql-server/
ML https://zh-tw.coursera.org/learn/practical-machine-learning
讓使用者了解他的程式碼會如何作用
在pro為主流的趨勢下 順應這些功能的平台是被需要的
因此我們的目標是提供一個以遊戲競賽為基底的程式設計學習平台。
且提供實時反應回櫃給使用者 讓使用者了解他的程式碼會如何作用整體運作下是否有邏輯差錯, 考慮不周,條件情境缺漏
讓使用者依據我們的需求開發輕便版的平台,簡單達到我們想要的功能,後面我們會介紹現有的相關平台並沒有一個平台完全擁有我們要的特點所以我們才會開發這個平台,但是這個平台還有許多需要克服改善的問題,我們後面也會做個簡單的比較
接下來要說明一下CodeGame平台是如何實現。
首先要報告的是平台的架構
接著做使用案例的介紹
再來藉由時序圖看運作流程,然後會用3D圖看整體架構work flow的概觀
最後會介紹 local test server的使用
Codegame平台的系統架構主要有三大部分。
第一部分是 Local test server
,再來是 Web server 第三部分是 平台後端- game server,
其中第一部份和第二部分有網頁介面作為與使用者互動的窗口,只有第二部分Web server有配置資料庫
使用者在 Local 上傳程式碼到 Webserver存檔, 當使用者操作Codegame介面,開始遊戲對戰,選擇程式碼後 webserver將程式碼傳給第三部分--平台後端,遊戲主要運行的地方,再將遊戲的畫面回傳給 webserver呈現在瀏覽器上
以上就是我們主要實作的部分
至於平台底層的設計,各server之間的連接和資料傳輸
下面會進一步描述實作細節
首先讓我們看一下OVT的架構。
OVT在PC上主要執行OpenRISC GUI和Central Service,兩者之間以socket連接
OpenRISC GUI作為與使用者互動的窗口,負責發送使用者的request到Central Service並且接受Central Service的回饋
Central Service與底層的平台連接,接受來自GUI發送的請求並且進行相對應的處理
以上就是本人主要實作的部分
至於底層的平台可以是搭載由本實驗室所開發的多核心OpenRISC的FPGA開發板,或者是在同一PC上執行的Or1ksim模擬器,和Central Service之間以Data Transfer Interface連接以進行資料的傳輸
下面會進一步描述本人主要實作的OpenRISC GUI以及central service的用途