The anticipation of a large penetration of Plug-in Hybrid Electric Vehicles (PHEVs) and Plug-in Electric Vehicles (PEVs) into the market brings up many new technical problems that need to be addressed. In the near future, a large number of PHEVs/PEVs connected to power grids will add a large-scale energy load, as well as add substantial energy resources that can be utilized. Vehicle-to-Grid (V2G) technology is a most promising opportunity in PHEV/PEV adoption. In this paper, the authors propose an intelligent method for optimally managing a large number of PHEVs/PEVs (e.g., 3,000) charging/discharging at a municipal parking deck. The authors used the Estimation of Distribution Algorithm (EDA) to determine the optimal charging/discharging times and patterns over a period of 24 hours. A mathematical framework for the objective function (i.e., maximizing the overall profit on a vehicle fleet base) is also given in detail. The authors characterized the performance of EDA-based energy management using a Matlab simulation, and compared it with other optimization techniques.