Hot answers tagged

3

Checkers? I don't know where you're drawing the line for a 'prohibitively large' data set, but a quick and naive consideration (read: definitely not even optimal) can store a board state in a maximum of 264 bits, and most will be far shorter. (Don't store info for captured/removed tokens.) Your tree will be pretty big but storage requirements are pretty ...


2

Risk has too many potential moves and too many potential outcomes per move to have a Chess-like AI be effective. You don't need to consider every possible move, and you don't need to do look-ahead. I would suggest you get some playtesters, or at least one or two smart gamers to help. If you're really just taking the Risk rules, or some sub-set of them, then ...


1

I'd try to avoid using any form of event dispatch within an ECS. From the looks of it you're trying to change state based on some kind of input. I assume that block of code where you track input is inside a system. So instead of dispatching an event why not just update the requisite components directly from that system. Systems can process multiple types ...


1

You want to patrol between different locations, so you could just create a list of locations to visit in order (so you would have two locations for a move back and forth behavior). Once your actor has visited each location she can start over and return to the first location (or you could visit the locations in reverse order, or stop, or whatever). For ...


1

It's trivial enough to determine actions via a fast formula (including bitwise ops) or a LUT (lookup table which could be a dense array, sparse array or hashmap), given the available info coming in via AI senses. Combine with FSM and you'll have a simpler, quicker, more debuggable system. I don't think you really need inference, here! You could instead ...



Only top voted, non community-wiki answers of a minimum length are eligible