This excellent question addresses the role of dogfighting in modern aerial warfare. However it seems that most ACM concentrate on maneuvering into shooting position. Why don't combat aircraft have rear-facing weaponry?
Even WW-II bombers had rear-, side-, and downward cannons, albeit manned. Could a small electronically-controlled cannon be added to the stern dorsal part of a combat aircraft, for shooting rearward? I've personally seen remote-operated FN MAGS on vehicles, the whole system seems to weigh on the order of 100-150 KG including hundreds of rounds. The vehicle-mounted systems took up about a cubic meter or so of space, but a purposed-designed system could probably take up less than half that, and probably shave off a good portion of the weight as well.
Could a computer not point a barrel at a vehicle with a relative velocity approaching 0 and shoot, even in a +Mach 1 wind in the direction of the target? It may be enough to just get a few bullets in, shotgun style. The Uzi rifles famously don't shoot straight, they make a cone of bullets. Perhaps this cone, if aimed in the general direction of an aggressive aircraft, might be enough to either disable it or get it off your tail. A short barrel will make a wider cone, perhaps the rear-facing weapon could have an very short barrel. ACMs such as the Cobra maneuver seem to imply that there are a finite number of angles from which attack is most likely, the weapon could be limited in angular range to those angles.
I'm sure that piloting an aircraft while trying to avoid being shot is difficult enough, so I wouldn't assume that such a system would be of much help on a single-seat aircraft. However, in a dogfight presumably the ROI or navigator could operate the guns while the pilot does the aviation.