I have some experience making AIs for computer games. Making an AI for any table top game like 40k would be very difficult. The original placement of the army is one of the hardest things to determine with a computer (obviously you could pre-make setups but they would not adapt to random terrain well at all). Off the top of my head I could probably figure out how to program an ok AI to control an army after set up (at least in warhammer fantasy, I haven't played 40k), but it would never be able to adapt as well as a good human player and it would take a Looong time to compute its next moves if you wanted it to be any good.
so it's possible to make, but would be difficult and time consuming to make well.