Double obstructing wall problem, what is the optimal walk path and length? Every day, you walk from point A to point B which are exactly $2$ miles apart straight line distance, however, each day, there is a $50$% chance of there being an obstructing wall perpendicular to the direct AB segment.  The wall cannot be seen so you wont know it is there until you actually bump it.  It is like an invisible force field that forces you to walk around it when you bump it and you will know immediately when you have cleared it , thus you can change your path once cleared.  The wall extends $1$ mile in both directions perpendicular to the direct AB path so if that wall is at the midpoint of AB, it would create a symmetrical + shape with the direct AB path.  Additionally, there is a 2nd obstructing wall that we have to deal with $25$% of the time (on average) but is only half of the length of the larger wall so it extends only $.5$ miles in both directions perpendicular to the direct AB path.  The $2$ walls can be present independently of each other.
You can assume all ground is flat and that neither wall will ever be within the first or last half mile of the direct path line segment between A and B.  That is, the $2$ walls can only be in the middle mile between A and B if at all.  For any given walk, there could be $0$, $1$, or $2$ walls present.    Also, any walls will be uniformly distributed in the middle mile.  If the $2$ walls are at the same exact spot, you can just treat that as if only the large wall is present since the obstruction would be identical.
What walk strategy will minimize the walk distance on average going from A to B?  That is, if you were to connect the dots of all the optimal (x,y) coordinates to be at during an average walk, what would the shape of the path look like (on a non-wall day)?
What is that minimum average distance to walk?
 A: I like to approach this kind of problem by first looking at worst cases, then see where I can make improvements.  first I assume that there is only the small wall present, located anywhere in the middle mile.  Starting at point A, I walk toward point B, but at an angle of 45deg to the right (one could have gone left instead) until I reach the point where I have walked 1/2 mile ahead and 1/2 mile to the right, a distance of .707 miles.  I am now at the outside edge of the right side of the small wall.  Now I walk straight ahead, parallel to the AB line for 1 mile.  I will not encounter any small wall because I am just to the right of it.  After I finish that mile, I will walk toward point B, which is .707 miles away, giving a total walk distance of 2.414 miles, and this will work every day there is no big wall, i.e. 50 % of the time. 
Now to account for the big wall.  I will start again as described above by walking at a 45deg angle to the right for .707 miles.  I then again begin to walk straight ahead parallel to the AB line, but now I might hit the big wall on my next step, or anywhere in the next mile.  It will make a difference in my walk if I hit the big wall in the first 1/2 mile or the last 1/2 mile.  Lets start with the big wall being in the first 1/2 mile, and call the distance "x" to the wall from where I started walking parallel to line AB, where x is measured in miles and has a value between 0 and 1 inclusive.  Once I hit the big wall at distance x, I begin walking along the wall toward the right, and go 0.5 miles to reach it's end.  Now I walk in the direction of B but again parallel to the AB line.  When I reach a point half way through the middle mile (if I am not there already), I can see point B directly, whether or not there is a small wall ahead, and I then walk directly toward B, a distance of 1.414 miles.  Here the total walk is .707 + x + .5 + (.5 - x) + 1.414 = 3.121 miles.
This answer is getting too long, so let me just say the worst case walk when the wall is in the last 1/2 of the middle mile is 3.325 miles.  Taking the two results for the big wall case, we have an average value for walk time with the big wall, with or without the small wall present, of about 3.223 miles, and will occur about 50% of the time.
RESULT:  I would take the first described walk every day, and if I ran into a big wall, I would modify my course as shown in the second described walk.  My average distance would be (2.414 + 3.223)/2 = 2.818 miles.  I make no claim that this number is the optimal solution, as other possibilities may yield slightly better results, but the effort is not worth the improvement.
A: I am currently designing another (3rd) simulation which will be "smarter" in that as it "wiggles" points/slopes, it will remember the partial path length up to that point and just compute the remainder of the path. This will likely speed up the simulation and allow me to use more iterations of the random walls to get a better average.  This is a "balancing act" between speed and accuracy.  What I can do during the day is reduce the accuracy so I can get a good idea of      the ballpark points/slopes, then highly restrict those points/slopes and increase the precision/accuracy and let it run overnight.  I should be able to get $8$ or so accurate slopes/points and that should be about $99$% of optimal I would think.  If someone beats me by say $0.01$ or $0.02$ miles (about $50$ to $100$ feet), I wont feel so bad for my solution and will congratulate them on their effort..
Someone with a fast computer should be easily able to simulate this and come up with about $8$ points/slopes rather easily.  I've given you by best solution so far so someone could take that and fine tune it even more.  This is not a hard program at all to write it is rather easy which is why I am surprised that someone didn't just write a program to do millions or even billions of simulated walks and just pick the best.  Just "wiggle" about $8$ points/slopes and you pretty much got it.  The curved walk path solution wont be much better than that, perhaps $0.01$ or $0.02$ miles shorter but that is only about $50$ to $100$ feet shorter so negligible.  I say this based on the solution to the previous (easier) related problem with only $1$ obstructing wall.  I was able to very closely approximate that optimal curve with only $8$ well chosen slopes.
However, I am somewhat amazed at how close to optimal the super simple solution of $4$ symmetrical slopes produces: $0.5$, $0.25$, $-0.25$, and $-0.5$, each cover half a mile.  This maxes out y at $0.375$.  An even simpler path would be a caret (^) shape with symmetric slopes of $0.375$ and $-0.375$, each one mile long.
Simple $2$ slope solution is about $2.72$ miles.
Simple $4$ slope solution is about $2.71$ miles. 
Following this pattern I suspect $8$ slopes would be about $2.70$ miles and $16$ slopes would be about $2.69$ miles.  I doubt an optimal curve would be much better than about $2.68$ miles.
I am currently running a simulation program overnight that is estimated to take about $10$ hours to complete.  It has $6$ wiggle points.  I will post the hopefully better solution as soon as I get it (in about $10$ more hours).  If my programming environment was compiled instead of interpreted, I could probably get my answer in a few minutes rather than many hours.  Even only a small fraction of the way thru, I am already seeing a path of about $2.6989$ miles ($1/4$ miles slopes of $.5,~.6,~.4,~.3,~-.1,~-.4,~-.65,~-.65$).  I don't have the proper setup to be able to wiggle these points effectively so someone else should try many points close to these to see if a marginal improvement is possible.
Unless I can rewrite my simulation program to run MUCH faster, there is not much more I can do with this.  I was hoping someone would just do a simulation and get maybe 8 points/slopes to approximate a curve and I would be happy with that since it should be close to optimal if the points/slopes are good ones.
I am making some progress on this.  I will take the case of the small wall only first and try to make it very fast.  Then with that working well, the other cases are somewhat similar.  Initially (for simplicity), I will only have $2$ slopes (likely $0.375$ and $-0.375$, each $1$ mile long.  If I build this thing up carefully and slowly so that I have a very good grasp on it, I should be able to make it fast enough so I can wiggle many points and it should run in a reasonable amount of time.
Actually, it seems like a proper answer to this question would not only show the non wall day walk path (likely a curve to be optimal), but also explain what you would do to "recover" when you hit a wall (or walls).  For example, if only the large wall is present, you will not walk the curvy path as when no wall is present.  But just saying you go around the wall seems insufficient cuz then what do you do after that?  Do you try to go back to your curvy (no wall) path?  Do you make a beeline for point B?  Is your strategy different for small wall hit first vs. large wall hit first?  I am beginning to think this problem may not be solvable cuz of the myriad of possible "recovery" paths.
How would someone know if aiming directly at B once clearing a wall is optimal or not?  I would think it depends on whether it is the small wall or large wall and where encountered.  I am thinking always pointing towards B immediately after a wall encounter is not optimal unless it is the 2nd wall encountered on a particular walk.
