Rabbit should look at all wolfs to live longer. If he would just run away from closest one - it may be a big mistake.
In this case he would live really long if wolf prefer to go "UP" instead of "RIGHT", or "RIGHT" instead of "DOWN" (clockwise priority). Also, rabbit may become immortal if there is just several non-randomized wolfs)
The simplest logic I can suggest is to check all wolfs on board and choose 5 closest, sort them by manhattan ditances (dx+dy), and let it be D1,D2,D3,D4,D5.
So, let "D - how dangerous it is to go in some cell". Compute
D = D1*A + D2*B + D3*C + D4*D + D5*E
A > B > C > D > E
for all 4 cells adjacent to current rabbit cell. And choose the cell with minimal value (you need to find A,B,C,D,E by experiments). I think you can also make some upper bound for D1,D2,D3,D4,D5. For example, the wolf which is D4 or D5 is really far - he should not gain any influence, so just make D4 = D5 = 0.
Of course, this logic will fail in such cases
But I don't think there is something we can do at all) so it's not a case we're trying to optimize