/Minimum_search_DQN-keras

Find the minimum of an unknown function with Keras using DQN

Primary LanguageJupyter Notebook

Minimum search with DQN - keras

20180131-DQN-keras-refine.ipynb

20180131-DQN-keras-refine.py

  • Objective

    • Find the minimum of an unknown function
  • Toolkit

    • keras >= 2.0
    • python 2.7, but I guess 3.5 is workable
    • matplotlib, numpy
  • Environment

    • Create one with some random coefficient, the minimum appear at x=4

    • Assume it's unknown

      alt text

    • action_space = [ '+', '-' ] , 0 : go right , 1 : go left

    • state_space = {0, 1, ...., 9} input range of x

  • Agent

    • An agent with Deep Q-learning is applied
  • Result

    • Loss is not stable

    alt text

  • Future Work

    • Use policy gradient
    • Modify reward function