from PIL import Image

instructions = 'LLRR'
colors = [(255, 255, 255), (0, 0, 0), (255, 0, 0), 	(0, 255, 0), (0, 0, 255), (255, 255, 0), (255, 0, 255), (0, 255, 255), (128, 128, 128)]
width = 1000
height = 1000
ant = {
	'position': [500, 500],
	'angle': 0 #up
}
steps = 10000000


instructions = list(instructions)
color_instructions = dict(zip(colors, instructions))
img = Image.new( 'RGB', (width, height), "white")
pixels = img.load()

for step in range(steps):
	x = ant['position'][0]
	y = ant['position'][1]
	pixel_color = pixels[x, y]
	turn = color_instructions[pixel_color]
	#DEFINING TURN ANGLE
	if turn=='L':
		ant['angle'] = ant['angle'] - 90
	elif turn=='R':
		ant['angle'] = ant['angle'] + 90
	if ant['angle']==360:
		ant['angle'] = 0
	elif ant['angle']==-90:
		ant['angle'] = 270
	#DEFINING NEW COLOR
	next_color = colors.index(pixel_color) + 1
	if next_color >= len(color_instructions):
		next_color = 0
	next_color = colors[next_color]
	#COLORING
	pixels[x,y] = next_color
	#MOVING
	if ant['angle']==0: #go up
		y = y-1
	elif ant['angle']==90: #go right
		x = x-1
	elif ant['angle']==180: #go down
		y = y+1
	elif ant['angle']==270: #go left
		x = x+1
	ant['position'] = [x, y]
img.save('Landons_Ant', 'PNG')

@@ -36,11 +36,13 @@
  = '
-L
+RR
 LR
+L
 R'%0Ac
@@ -180,16 +180,92 @@
 , 128)%5D%0A
+movements = %5B%0A%09%5B0, -1%5D, #up%0A%09%5B-1, 0%5D, #right%0A%09%5B0, 1%5D, #down%0A%09%5B1, 0%5D #left%0A%5D%0A
 width = 
@@ -334,16 +334,31 @@
 0 #up%0A%7D%0A
+test_angle = 0%0A
 steps = 
@@ -363,19 +363,16 @@
 = 100000
-00%0A
 %0A%0Ainstru
@@ -399,34 +399,20 @@
 ctions)%0A
-color_instructions
+rule
  = dict(
@@ -619,34 +619,20 @@
 %09turn = 
-color_instructions
+rule
 %5Bpixel_c
@@ -683,32 +683,33 @@
 %09ant%5B'angle'%5D = 
+(
 ant%5B'angle'%5D - 9
@@ -707,18 +707,22 @@
 gle'%5D - 
-90
+1) %25 4
 %0A%09elif t
@@ -748,16 +748,17 @@
 gle'%5D = 
+(
 ant%5B'ang
@@ -768,109 +768,37 @@
 %5D + 
-90%0A%09if ant%5B'angle'%5D==360:%0A%09%09ant%5B'angle'%5D = 0%0A%09elif ant%5B'angle'%5D==-90:%0A%09%09ant%5B'angle'%5D = 270%0A%09#DEFINING
+1) %25 4%0A%09#DEFINING THE PIXEL'S
  NEW
@@ -874,26 +874,12 @@
 len(
-color_instructions
+rule
 ):%0A%09
@@ -937,16 +937,34 @@
 COLORING
+ THE CURRENT PIXEL
 %0A%09pixels
@@ -994,203 +994,115 @@
 VING
-%0A%09if ant%5B'angle'%5D==0: #go up%0A%09%09y = y-1%0A%09elif ant%5B'angle'%5D==90: #go right%0A%09%09x = x-1%0A%09elif ant%5B'angle'%5D==180: #go down%0A%09%09y = y+1%0A%09elif ant%5B'angle'%5D==270: #go left%0A%09%09x = x+1%0A%09ant%5B'position'%5D = %5Bx, y
+ THE ANT%0A%09ant%5B'position'%5D%5B0%5D += movements%5Bant%5B'angle'%5D%5D%5B0%5D%0A%09ant%5B'position'%5D%5B1%5D += movements%5Bant%5B'angle'%5D%5D%5B1
 %5D%0Aim
@@ -1120,16 +1120,17 @@
 dons_Ant
+3
 ', 'PNG'

Update Langtons_Ant.py