Getting ai to function well is not impossible, it just takes a lot of time. Getting ai to drive a course like a human player is not impossible, it just takes more time. It is almost impossible to get ai to drive a course like a human player at every spot on a roadcourse, but by applying some tricks you can get it pretty close (or at least tolerable).
The most important factor is having a good race.lp for the ai to follow. It is best to have a race.lp that was made at racing speed because the ai will drive that line very close to how it was driven when it was made (using reflap). When a race.lp is made without regard to correct speed/braking, the ai interpret the data of the track, via the exe, and intepolate the resulting actions rather than applying the data of an actual race lap. (It's a little more complicated than this short explanation, but this is the crux of it.) The track.ini is just a way to fine tune the ai to the race.lp. That's why you'll seldom get very good results by just importing track.ini sections sections from another track.
Judging from the look of the the raceline for ButiBamBa, it looks to me like the race.lp was not made "at speed". I still found it works pretty good. The min/maxrace lp's are a little close together at a couple of places which leads to crowding and collisions. The min/maxpanic lp's could have been spaced farther from the min/maxrace lp's and that would give some additional avoidance space. The rear-ending is partly an exe problem, and a track.ini adjustment could help that. [ai_panic_decel= higher value, and ai_squeeze_pcnt = 0.10/0.15 (although with the close spacing of the supporting lp's it may not help).]
The other fix requires altering the ptf, changing asphalt default values to concrete values 0.005 to 0.010 higher than the asphalt values at braking zones where the ai are able to outbrake the player. Sometimes, especially in gtp, the ai can outbrake the player no matter the ini values ( often happens at the end of an 'accelerating straight' to a heavy braking corner ). So, when the ai brake correctly (you don't rear-end them and they don't rear-end you) for most situations/corners, but at one or two they just have more braking ability and brake much later than the player has to, you raise the grip level for that braking zone. The ai don't gain as much benefit as the player when there are small discrepencies between asphalt and concrete values. The higher grip braking zone lets the player brake later, provides better stopping power, and allows a quicker return to the throttle, thereby reducing the chance of getting rear-ended. Of course, this helps more when the player is more proficient at braking.
More detailed ai creation information can be found here: http://www.nrtracks.com/nr2k3.html