I Have Working Enemies

I’ve successfully made the enemy programs move and attack the player’s programs autonomously. They use my Dijkstra function to work out the shortest route to get within attacking range of a player program, then take that route and attack. It updates when the grid changes and avoids obstacles. Obligatory video:

This is significant. The enemy AI is probably the hardest part of the game to create. At least one person abandoned his Nightfall Incident based project after hitting a wall with the AI. It’s quite simple, and I could always improve it, but the fact that I’ve now got it working means I’ve overcome probably the most significant hurdle. It means I’m much more likely to complete this game and succeed where at least eight other people have failed.

2 thoughts on “I Have Working Enemies

  1. Teradile, this is fantastic. It’s encouraging to see the steady stream of progress, and more so to see you hit a hurdle like this but not get stuck forever. However, if something does end up getting you stuck indefinitely, I’ll be happy to give you any help, or a prod… I wouldn’t want to see you added to the Nightfall Graveyard if I can help it, especially not after witnessing all this. Your current state seems ahead of the typical points at which the others died (?), so it’ll be interesting to see what the rest of the hard problems are that many didn’t get far enough to meet in the first place.

    When I read your previous “I’m still alive” post the other day, it suddenly brought me back to the times when I was stuck in front of the “AI question” and well out of my depth. It also got me excited about all the different techniques and approaches one could use, that I’d only learned about in CS undergrad long after giving up hope on Nightfall. For example, that example you gave of naively attacking the nearest units vs. intelligently piling on a single unit to destroy it completely — that clearly leads into the named fields of utility theory, decision theory, planning, and so on through the multiple decades of AI research – though Deep-Blockchain-Cloud-Learning-AlphaSpybotics-grade “Guard Pups” might be a bit far and not that fun, ha ha.

    I don’t know how much existing familiarity or interest you might have in delving into all that, but actually that is the failure mode that many of us (me at least) get stuck in: depth-first tumbling down some narrow rabbit hole, that is far easier to write about, than do anything with 🙂 so well done for avoiding that and doing the successful thing: something working that lets you build the rest of the game on the basis of *some* AI which can itself be improved when appropriate. Such an attitude is critical for getting the immediate feedback and gratification that comes with it, which I’m sure you must be feeling already. Viva la Nightfall!

    Liked by 1 person

    1. Thanks for the support. I realised it was a rabbit hole and decided not to over-complicate it, at least for now, but I could make the AI a bit smarter later. Honestly the things about utility theory and decision theory are over my head. I like the process of putting together if statements and while loops etc. to make a program do what I want, but reading about theory doesn’t interest me much.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s