rmojgani / RLonKorali

1 stars 4 forks source link

Spatially periodic policies #5

Open rmojgani opened 1 year ago

rmojgani commented 1 year ago

Hi @wadaniel ,

I am thinking of a property of the policy that you might have thought about before, so decided to share my thoughts with you.

I have a one action per agent policy implemented, but then realized probably my policy should also be periodic, as my spatial domain is doubly periodic.

I think this should appear in my upsampling function: https://github.com/rmojgani/RLonKorali/blob/39d21132f01917fea1ab455a6ebadb43079d6046/experiments/flowControl_turb_code/_model/turb.py#L472

this is what I mean: below is an image of contour plot of forcing, but as you can see the values on left and right of the domain are not continuous, but I was expecting them to be (since my domain is periodic)

image

Let me know what you think

wadaniel commented 1 year ago

Hi, yes thats a good observation and I did this aswell. you must take care of it in the upsampling procedure (with upsampling, you mean interpolation on the finer grid, right?)

rmojgani commented 1 year ago

Hi, (with upsampling, you mean interpolation on the finer grid, right?) yes.

I am thinking of passing through a periodic map, e.g., sin(x) and sin(y), any better ideas ?

wadaniel commented 1 year ago

Hm I thought this could be handled much easier and just linearly interpolate the most right and the most left stencils on the coarse grid to introduce periodicity in x?

rmojgani commented 10 months ago

This is the update : https://colab.research.google.com/drive/1JBs71VmJHwWQ89q3kAlLpyVON6CFVrUZ?usp=sharing