前回、離散値ってなんや?というnoteで 強化学習で必要な離散値とは何か?なぜ必要なのか? について書きました。 今回は具体的に離散値に変換していきます。 今回やるのはこちらのコードです。 強化学習の手法のうち、Q学習というものをやっています。
#for creating vectors Vec=np.array([1,2,3,4,5,6,7,8,9,10,11]) print(Vec) #for creating matrix Matrix= np.array([[1,2,3], [4,5,6],[7,8,9]]) print (Matrix) #transpose ...
This package provides two functions, linspace and meshgrid, that are useful for creating vectors or matrices for several proposes. It's useful if you want to closely replicate code in Matlab or Python ...