BGP Attributes and Path Selection

How BGP selects path if I advertised routes from same AS numbers where BGP detects two similar paths with nearly the same local preference, and weight as well?

Regards,
Vijay