Body: <p>I'm a RL beginner and I have a project in mind: I'm an engineer who works doing CAD projects and there is a time consuming task that I want to automatize. This task it's doing by a person because it requires certain logic.</p>
  <p>For example, given a CAD model with several object in it (Circles, rectangles, etc) the objetive is to tag every object following certain rules:</p>
  <ul>
  <li>Tags cannot cross between them.</li>
  <li>Tags cannot overlap other tags.</li>
  <li>If possible, the tags must be aligned.</li>
  <li>If possible, the tag must be near the object.</li>
  <li>If the tag fits inside the object, it must be placed inside it. If not, the tag must be placed outside the object.</li>
  </ul>
  <p>This is how a example model looks:</p>
  <p><a href="https://i.sstatic.net/OSLRY.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/OSLRY.png" alt="enter image description here" /></a></p>
  <p>My idea is the following. I can export the CAD model to a &quot;shp&quot; file and load it in Shapely (a GIS Python library). With this I can create the environment.</p>
  <p>Once I have the environment I can start iterating over the states. Every state will be a representation of the environment. In the state zero I won't have any tag, so I can start putting the first tag that will be a rectangle with fixed dimensions. Once the tag is added I can get the reward based on the position, checking if the tag overlap another object, if it's too far from the source object, etc.</p>
  <p>The next state will be the environment with the previous tag and so on.</p>
  <p>I don't know if this can work. I believe the agent must execute some sort of planning but, correct me if I'm wrong, this is not possible with Q-Learning or another tabular method.</p>
  <p>So, the question is...could be possible to do it with a tabular method or I will have a super large table to handle?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-09T22:19:29.310Z
Comments.Text: It's not the right tool for the problem. The problem of how to represent the objects and how to determine if there is overlap with tags or if tags can fit is nontrivial by itself since you have a bunch of nonconvex objects here. That's actually the hard part, the easy part then is to just iterate through all objects and then put tag for each of them, which is what you wanted to do through RL but it's unnecessary since you can just go through each object.
Comments.UserDisplayName: Brale
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-10T13:41:49.603Z
Comments.Text: @Brale I can represent the objects and check if there is overlap and other type of things. My problem is I can't make a standard script to place the tags, because the objects change between projects because the tag placement require certain logic and planning.
Comments.UserDisplayName: Eduardo
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-10T18:19:04.150Z
Comments.Text: Look into book "Planning Algorithms" by LaValle
Comments.UserDisplayName: Brale
Tags: <reinforcement-learning><deep-rl>
Title: Are tabular methods appropriate for this task?
UserDisplayName: Eduardo
ThreadText: # Are tabular methods appropriate for this task?
  
  (Asked by: username_0 on 2022-02-09)
  
  I'm a RL beginner and I have a project in mind: I'm an engineer who works doing CAD projects and there is a time consuming task that I want to automatize. This task it's doing by a person because it requires certain logic.
  
  For example, given a CAD model with several object in it (Circles, rectangles, etc) the objetive is to tag every object following certain rules:
  
  * Tags cannot cross between them.
  * Tags cannot overlap other tags.
  * If possible, the tags must be aligned.
  * If possible, the tag must be near the object.
  * If the tag fits inside the object, it must be placed inside it. If not, the tag must be placed outside the object.
  
  This is how a example model looks:
  
  [![enter image description here](https://i.sstatic.net/OSLRY.png)](https://i.sstatic.net/OSLRY.png)
  
  My idea is the following. I can export the CAD model to a "shp" file and load it in Shapely (a GIS Python library). With this I can create the environment.
  
  Once I have the environment I can start iterating over the states. Every state will be a representation of the environment. In the state zero I won't have any tag, so I can start putting the first tag that will be a rectangle with fixed dimensions. Once the tag is added I can get the reward based on the position, checking if the tag overlap another object, if it's too far from the source object, etc.
  
  The next state will be the environment with the previous tag and so on.
  
  I don't know if this can work. I believe the agent must execute some sort of planning but, correct me if I'm wrong, this is not possible with Q-Learning or another tabular method.
  
  So, the question is...could be possible to do it with a tabular method or I will have a super large table to handle?
  
  **Tags:** reinforcement-learning, deep-rl
  
  > **Comments:**
  > **username_1**: It's not the right tool for the problem. The problem of how to represent the objects and how to determine if there is overlap with tags or if tags can fit is nontrivial by itself since you have a bunch of nonconvex objects here. That's actually the hard part, the easy part then is to just iterate through all objects and then put tag for each of them, which is what you wanted to do through RL but it's unnecessary since you can just go through each object.  
  > **username_0**: @username_1 I can represent the objects and check if there is overlap and other type of things. My problem is I can't make a standard script to place the tags, because the objects change between projects because the tag placement require certain logic and planning.  
  > **username_1**: Look into book "Planning Algorithms" by LaValle  
  
  ---
  
  ## 0 answers
  
  