Skip to content

ASX Gym Render Modes

James Shen edited this page Jun 13, 2020 · 1 revision

render for an environment actually is optional. Here ASX Gym provides 3 render modes:

 metadata = {'render.modes': ['human', 'ansi', 'rgb_array']}

Human

Render on screen for humans.

asx gym rendering

rgb_array

This mode doesn't render on-screen, but returns an RGB array of images.

Ansi

This mode print text on the screen , instead of show images.

env.render(mode='ansi')

Sample ANSI renders (actually show different colors for different sections)

________________________________________________________________________________
Date:2019-08-01 10:15:00
Episode:1 Step:10
____________________________________________________________
Total value:99853.97    Available Fund:57904.69
____________________________________________________________
ASX ALL ORD Index
  Open:6896.7 Close:6871.9 High:6896.7 Low:6864.8
____________________________________________________________
Stock List Prices
  Company:Commonwealth Bank (ASX:CBA)
    Ask:83.09 Bid:83.09 Price:83.09
  Company:BHP Group Limited (ASX:BHP)
    Ask:40.77 Bid:40.77 Price:40.77
  Company:Westpac Banking Corp (ASX:WBC)
    Ask:28.93 Bid:28.93 Price:28.93
  Company:National Australia Bank (ASX:NAB)
    Ask:28.63 Bid:28.63 Price:28.63
  Company:ANZ Banking Group (ASX:ANZ)
    Ask:27.99 Bid:27.99 Price:27.99
  Company:South32 (ASX:S32)
    Ask:3.16 Bid:3.16 Price:3.16
  Company:Seek (ASX:SEK)
    Ask:21.26 Bid:21.26 Price:21.26
  Company:SPDR S&P/ASX 200 Fund (ASX:STW)
    Ask:63.29 Bid:63.29 Price:63.29
  Company:Dicker Data (ASX:DDR)
    Ask:7.7 Bid:7.7 Price:7.7
  Company:Infomedia (ASX:IFM)
    Ask:2.02 Bid:2.02 Price:2.02
____________________________________________________________
Portfolios
  Company:Commonwealth Bank (ASX:CBA)
    Price:83.09 Volume:317.0
  Company:Seek (ASX:SEK)
    Price:21.26 Volume:31.0
  Company:Dicker Data (ASX:DDR)
    Price:7.31 Volume:41.0
  Company:Westpac Banking Corp (ASX:WBC)
    Price:28.93 Volume:231.0
  Company:ANZ Banking Group (ASX:ANZ)
    Price:27.97 Volume:193.0
  Company:National Australia Bank (ASX:NAB)
    Price:28.69 Volume:12.0
  Company:SPDR S&P/ASX 200 Fund (ASX:STW)
    Price:63.62 Volume:19.0
  Company:Infomedia (ASX:IFM)
    Price:1.99 Volume:135.0
  Company:South32 (ASX:S32)
    Price:3.16 Volume:25.0
  Company:BHP Group Limited (ASX:BHP)
    Price:40.97 Volume:16.0
________________________________________________________________________________

asx ansi rendering

ASX GYM

Clone this wiki locally