his is a very simple string that will just have it auto-fire in front of the ship, to demonstrate the mod does work
0eNqtlutu4jAQhd9lfjsVSYDakfqjb7ErVCFDB9ZSYqfOhF2E8u4dh5ZeaLeXqZAgMT5nzvizIQdY1T220XmC6gBuHXwH1eIAndt6W6cxbxuECmwkV9cY9xn1MSLBoMD5W/wHVT7cKEBPjhwe1ePNfun7ZoWRJ6hHl+RP1lO2Ds3KeUshgoI2dKwNPpVLfvnFTMEeqsuLGVdhDcVQL1f4x+4cC3hWh+sk6F5ec+XHSAo2riaMr0fPu7Fxi+T8NovYBEKOc9fbmuPzNB9iw6uQMjStjWPcCq7GgT4tGbfOr2FQZz0Xb9T6b9OlvOl3opTqXYjnMeYvYpwES9tTWJ4WCyqKPb5Ra/pN1PrnUdO+TTl2LlI/QnwIdtza2a+vklYn8+JD899fM8/yyeSZf/mh//X3timf078ujod0katcFSq/UQt+V1O+4m+Z9sMRfg1qctwVw1OS1q4xa2tLGy6fbbjSrR0VqZMzzjJ5IZOXMvlUJp/J5HOZ/FImP3LXMu5axl3LuGsZdy3jrmXctYy7lnE3Mu5Gxt3IuBsZdyPjbmTcjYz75+T8i+8IG5709BioYMf/paPhbF6YqTH8UZpyXg7DPbFwcCY=
The problem seems to be in AAI programmable structures. When I try to build the programmable towers in space, the input and output terminals don't build. This means the tower has no way to connect to anything which breaks the blueprint. You can work around this by placing them with /editor mode.
Past that, the tree blueprint won't work as there are too many types of asteroids for it to handle. You need to change the arithmetic contaminator to a decider that checks for each asteroid type you want to shoot and outputs targeting remote if they are > 0. Also it scans one tile per tick in a random radius; most of the time it's going to be scanning your ship.
Try a zone scanner instead:
0eNrFWG2PmzAM/i/5ulA10NKCtEn7D/uwqaoQhZRGg4SFcGt34r/PgZZre0W8XNbpPtQk8WP7wTbOvaJdWtJcMq6Q/4pYJHiB/M0rKljCw1Sv8TCjyEd/BKdWEYUcVRgxHtMj8kmFH5wslCwjZSWUU8miWgckq6BKMZ4UV/p2tcWIcsUUo43Z+uEU8DLbUQkG8AVUO6ZCrqxIZDvGQyUkwigXBegKrq0DnmXPZ0uMTsj3ZkswA0pKijTY0UP4wkADjhU00hrFrQymLzFhtGepovJ+VZ1y7cgLk6qEePENMTELEwE0WCndK0vSGPZ/wTEIBo5wIbNaBZzPQ1k776PP9UKpmSfVFv4qTecdA/ZIBohzw0DMZBMj8hdP4qPJB+urKQacFjmUTB0yqiCperKgZoCQgRS84QawHbOWjz2ThQreErwn5G86tYFDwAgubwv54IzIKYRcu4A+gZooVV4OAe7IreohUYtWLaYRi6HkBrE0H8jSGfSOouunzYcYG6zUZEyle0dD5H3H6jd627eGOBmJ/BTUloO9FFnAOBhG/j5MC9qRuEs8tCM+KGP3XMbn1/PMyp2PrVzcgtu94GQcuHWN7uBhqTHZ/UWvgaKU+zCiHwhi2WvjaCmW0ulRuAMsFOXuAzGsei3kjP8cbaDrC+B2FVJThA+qZzVzPc8m61VbRJfnqbXU4doKv5+P+qr5Acy6K8KmwT2CXM5szzUY4MRmMaXiyHxUy5hSD5brjWocpyk2yNztzFlv9NRCnP8ztZxDNz26nNF/dAwrZD6ZoPmTCTr+U4K+dxFErggCB1IqTz38XC4/g1Noatcj9rhR8/Lm7CeMmo2rVzRDEacWpAH8QIaFBfQ4weJmprsq7C9IBzoQNKMxKzPTqDuWmIY8lAk1jdkwGoVyJ7hpRg2jakYNQ9aMGsZsGBVHSHqzdJqE1FyaxKuJNAnYsJjD7Yyqg47eKJXGcTWfxkFrUgeidt6f3312VCgTqq+qlqSZUHTQhRjgf0On1+Abggl2MdnijQ0SfNq06IC4wE4tOeftRbu2wDZeYxukNax59a6WYHBoRbsWPdA+Q8Lmm0yaI84WPGGKZprz9p+dGL3ArFt/hJau7S08D34cz3GdqvoLt7AmOg==
this doesn't work, but with some tweaking it might. I'm not sure the AAI buildings actually detect asteroids; if they do it's going to be quite the challenge to get it working. Remember you have to spawn the zone scanner with /editor or check to make sure the input/output terminals actually got built.
You might be better off for now just setting up a system that automatically bombs the front of the ship, keeping it continuously clear.