The everyday infantry droids in the Star Wars prequels and The Clone Wars TV series are dumb as rocks. They are constantly confused, hoodwinked and bamboozled by paper-thin schemes, when they aren't tripping over their own feet into disaster. Yet more advanced droids, like assassin droids, protocol droids and astromechs like C-3PO and R2-D2 are highly intelligent, and referred to as "a dime a dozen" by Obi-Wan (Downfall of a Droid, Clone Wars 1-6). Is there an in-universe explanation of why the Separatists don't equip the infantry droids with better programming?
B1 battle droids are less intelligent because they didn't need to be smart, nor were they designed to be. As a matter of fact, they were originally designed to be coordinated by a Droid Control Ship which would coordinate and direct their strategy, fire patterns and overall tactical movement.
B1 Battle Droid's Role in Combat
Was a lack of brainpower a handicap to the B1?
B1 battle droids did not NEED to think, and they weren't INITIALLY designed to think. They had leaders, handlers, or control software to direct their movements in whatever terrain they found themselves in.
Say what you like about the supposedly idiotic B1 battle droid; in the field, they were able to keep a rain of blaster fire on the enemy, suppressing their movement, tactics and their fire, allowing more potent droids the opportunity to get close, tear into the defenders and simply allow the B1s to pour through any hole created. In terms of strategy, it's simple, but like army ants, the B1 battle droid used it quite effectively.
Because They Are Cheap and Expendable
The most notable aspect of the B1 Battle Droid?
There are lots of them:
To get more of them, they almost were certainly made from cheaper parts. Slower processors, less memory, etc. To put it in modern day terms, they are stupid for the same reason that a Dell $299 special can't run Crysis the way a $4,000 gaming rig can.
In Innocents of Ryloth, Ahsoka comments on this:
Their less mass produced predecessor, the OOM series, was smarter:
And during The Clone Wars show, we also see there are more capable commando droids. They are built for stealth, a handful of them could take down a trooper outpost ... but conversely:
So we see a rather consistent trend that the more common the droid, the cheaper they are ... and also the dumber they are. As to why the droids often behave in strange ways, like talking to each other while trying to gun down Jedi's ... this is how all droids in the Star Wars universe work. For whatever reason, droids in Star Wars have personalities - and not just protocol droids. Why does a MSE "mouse" droid "run in fear" from a loud noise?
It may not make logical sense, but however Droid AI works in the Star Wars universe ... this kind of behavior is not uncommon.
As for "constantly confused, hoodwinked and bamboozled by paper-thin schemes" - this usually occurs when the droids aren't doing what they good at ... which is forming a massive army and killing things. As a standing army - they're pretty good. Remember that the Droid Army:
They're dumb. They are however, effective. When used as designed. And while it is true that they seem to fail at being guards, they are often depicted that way when facing Jedi Knights. A good example of this is "The Hidden Enemy", where:
In the opening scene we see the B1's used correctly - accompanied by a tactical droid, they very nearly overwhelm and defeat a squad of clones and two Jedi. That is no small threat. They're not built to be smart - they're built to follow orders, walk in columns and keep shooting.
That said, I can't answer why The Separatists don't rely on more human/intelligent assets for roles which require more individualized tasks (which is where the B1 routinely falls short).
The Battle Droids are meant to be ineffective from a story telling standpoint. We needed to see the evolution from Battle Droid> Clone Trooper> Stormtrooper. Palpatine uses the infantry of the CIS due to their sheer amount of resources, then disposes of them when the time comes.