Electrical discharge machining is a process of machining a work-piece to a desired shape by using the eroding effect of electric spark discharges. A gap width controller is one of the key components of each electrical discharge machine. It is gap width controllers that mainly determine the machining speed and accuracy. This article describes a gap width controller based on fuzzy logic. The control algorithm operates according to the number of short circuits, open circuits and normal pulses that occur within a control period. A specially developed PC application allows for accessing and modifying electrical discharge machining parameters.