Recently, reconfigurable metasurfaces have emerged as a promising solution for wavefront manipulation in the terahertz (THz) region, providing enhanced beamforming capabilities. However, traditional single-parameter control methods fail to achieve independent phase and amplitude modulation, constraining their modulation capabilities. Meanwhile, forward design methods based on phase matching ignore the structural responses of the non-ideal unit, leading to degraded beamforming performance. Here, we introduce an electrically reconfigurable metasurface composed of bilayer graphene strips based on dual-parameter control. Full-wave simulations demonstrate independent amplitude and phase modulation, achieving the full 360° phase coverage and an adjustable amplitude range from 0 to 0.8 at 2.6 THz. To optimize beamforming performance, particularly for the responses of the non-ideal unit away from the designed frequency, we employed an inverse design method based on a hybrid evolutionary algorithm. This novel approach significantly enhances beam steering, achieving a maximum 60% increase in beam directivity and maintaining over 90% of ideal directivity across a broad frequency range from 1.6 THz to 5 THz. Especially, it achieves a maximum deflection angle of 75°. Meanwhile, the adaptability of the inverse design method is further demonstrated to various optimized objectives. For beam focusing, even with limited phase control (below 210°), this method significantly enhances the focusing quality (up to 150% enhancement) and increases the focusing efficiency from 25% to 40%. Additionally, it effectively mitigates the impact of quantized phase errors on beamforming. This research not only demonstrates potential applications in high-speed THz wireless communication and compact imaging systems, but also paves the way for innovative designs in reconfigurable metasurfaces.