TOKYO -- Hitachi plans to install an artificial intelligence system that automatically fixes production line malfunctions by rewriting code at its plants next fiscal year, in a step toward autonomous factories that can be run almost entirely without human intervention.