Skip to content

Custom homemade replica of Berkeley's CS188 class implemented in C++, wxWidgets

Notifications You must be signed in to change notification settings

pmarangone/crawler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Crawler CS188

Custom homemade replica of Berkeley's CS188 class implemented in C++ and wxWidgets by Patrick Marangone (@pmarangone) and Sergei Kononov (@hemulens). Please find our original project repository here.

Target Interface Examples

Example 1

Target interface of the project

Example 2

Target interface of the project

Tentative TODOs

Build GUI

  • Create top and bottom panels
  • Add two buttons: ["run", "stop"] + see other buttons needed
  • Make the bottom control panel neat:
    • Step delay, discount, epsilon, learning rate
    • Create output fields / text fields with background
    • Round edges of spin controls: (canceled)
      • SetThemeEnabled
      • SetExtraStyle, SetWindowStyleFlag, SetWindowStyle
      • SetLayoutDirection, SetWindowVariant
    • Wire up controls:
      • Create and connect IDs and functions
      • Set increment step sizes
      • Set default values (through Robot)
      • Set min/max ranges
      • Read values from spin controls
      • Pass values from spin controls to Robot class instance living in the MainFrame (_robot)
  • Refactor panels:
    • Move all three panels to panels.h (canceled)
    • Create two polymorph classes from wxPanel (TopPanel, BottomPanel) (canceled)
    • Set controls ownership to the parent class
    • Destroy spin controls in the parent class destructor (bottom panel) (canceled)
    • Destroy btn controls in the parent class destructor (top panel) (canceled)
    • Destroy panels in the parent class destructor
  • Ownership of control variables:
    • Move '_learningRate', '_discount' and '_epsilon' to Robot
    • Transfer data to Robot class
    • Make control handles private class members
  • Abstract away layout initialization process
    • Create menu initialization function
    • Create panel initialization function
    • Create app layout initialization function
  • Repair the bug: clicking on the panel makes num * 1000:
    • Try the following:
      • AcceptsFocusFromKeyboard()
      • SetCanFocus(false)
      • Freeze()
      • wxTextCtrl / wxSpinCtrlDouble inherited functions:
        • SendDestroyEvent
        • OnSetFocus
        • OnKillFocus
        • OnTextLostFocus
        • OnFocus
        • DisableFocusFromKeyboard
        • OSXSimulateFocusEvents
    • Cout event name when a panel clicked after incrementing a spin control (change to wxTextCtrl happens on unfocus)

Create Graphics

  • Embed a bitmap frame into the main window:
    • Implement rule of five for Graphics
    • Switch _graphics to smart pointers
  • Learn wxWidgets' bitmap and rendering mechanism under the hood:
  • Render a static floor
  • Render crawler's body:
    • Create robot's body dimensions
    • Create robot's arm and hand

References & Resources

CS188 Reinforcement Learning resources

wxWidgets bitmap resouces

Temporal Difference and Q-Learning resources

About

Custom homemade replica of Berkeley's CS188 class implemented in C++, wxWidgets

Topics

Resources

Stars

Watchers

Forks