Absolutely you can exclude cards from your opponents range based on how they played the flop, however because people aren't rational 100% of the time, and poker being a game of probability with an element of human emotion, it's never necessarily something you can completely exclude. As your bot learns, and builds its range against specific players it will be better against each individual player. What I will say also is don't forget to include pre-flop too into the decision making when excluding cards.
Now your bot can for sure pick up patterns between players, but what you want to do will have to be player specific, making decisions solely, and tailored on each individual player. The more it plays, the better it can make these biases, but ultimately it will never have 100% accuracy.
As to how to do these, let me give you an example:
Say your bot has a reasonable hand in late position. A tight player, from the hands your bot has seen anyway, opens in mid position, they have a 25bb stack. Now what do you think makes sense for the starting range of a tight player, with a smallish stack in mid position? They'll probably be reasonable strong, likely 88+, suited connectors from 10,J up and likely all broad way connectors.
We can work out this range based on what makes sense for a tight player, with their stack, position, what hands we've seen them play/reach showdown with and how they have played hands with other players too.
Let's say the flop comes low, unsuited cards. If the tight player checks here, when they normally would have bet when strong what cards do you think you can discredit somewhat from his range? Well you can likely discredit any set seen as the board is low and they're a tight player, they didn't bet when they normally do, so probably no pocket pair, so likely they have some broadway connectors. But whatabout if they have checked a lot of their big pairs to not scare anyone away, or if they check their sets, etc? Ok in these situations we don't learn much to narrow their range yet, but we can use it help narrow a range further on the turn, i.e. they bet big on the turn after a check.
What I would suggest for your bot, is to build rules that track a few key aspects of players. Some suggestions of what I feel is meaningful data to track to help exclude cards from a players range would be:
- Stack Size, shorter stacks (11bb-20bb) people tend to be able to wait for stronger hands, really short stacks people's ranges explode because they can't wait for good cards anymore, often any ace will do.
- Position of raise, earlier tends to be stronger, but definitions of 'weak' and 'strong' can differ greatly between players. This is something you can track for each individual player.
- Player trends, i.e. hands they've played in the past and how they have played them. I.e. that time they had aces, they raised every street, or that time they had A,K and raised pre, raised flop and shutdown on the turn and river, etc. How they play draws, how they play mid-pair, etc,etc.
- Actions in front of player, i.e. if player raised on the flop, after there has been a raise and a call, do they do this only strong, or do they do this super light, etc.
I can't really list everything for you to track, but there are countless articles out there about building a range post-flop for your opponents. Use these, break down the key concepts into variables you can track and recall to weight certain decisions for your bot.